我可以将我的解决方案绑定到Project Euler#37吗?(Can I bound my solution to Project Euler # 37?)

编程入门 行业动态 更新时间:2024-10-28 16:27:58
我可以将我的解决方案绑定到Project Euler#37吗?(Can I bound my solution to Project Euler # 37?)

我正在努力完成欧拉项目并且已经开始了这个项目:

3797号有一个有趣的财产。 作为素数本身,可以从左到右连续删除数字,并在每个阶段保持素数:3797,797,97和7.同样,我们可以从右到左工作:3797,379,37和3。

找到从左到右和从右到左都可截断的仅有的11个素数之和。

注意:2,3,5和7不被认为是可截断的素数。

考虑到这些素数中只有11个,这个解决方案很简单(虽然我确信你可以像你想要的那样聪明)但我不会放弃答案。

但我们怎么知道只有11个呢? 这是刚刚给出的,没有任何解释。 经过大量的搜索后,我还没有找到这方面的证据,所以有人知道为什么我们可以做出这个假设吗?

I'm working my way through the Euler project and have come to this one:

The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.

Find the sum of the only eleven primes that are both truncatable from left to right and right to left.

NOTE: 2, 3, 5, and 7 are not considered to be truncatable primes.

The solution, given that there are only 11 of these primes, is straightforward enough (although I'm sure you can be as clever as you want about optimization) and I won't give away the answer.

But how do we know there are only 11? That's just given, with no explanation. I haven't found a proof of this after a fair amount of searching, so does anyone know why we can make this assumption?

最满意答案

看看本文由I.0.Angelí和HJ Godwin,他们发现了这一点。 。 。

最大的左截断素数是357686312646216567629137(基数10) 最大的右截断素数是73939133(基数10)

使用此信息,您可以检查0-73939133之间的所有数字,并找到左右可截断的数字。

Looking at this paper By I. 0. Angelí and H. J. Godwin, they have found that . . .

the largest left truncatable prime is 357686312646216567629137 (base 10) the largest right truncatable prime is 73939133 (base 10)

Using this information, you can examine all numbers between 0-73939133 and find the numbers that are both right and left truncatable.

更多推荐

本文发布于:2023-08-06 06:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1445059.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:绑定   解决方案   Project   Euler   bound

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!