(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=44080472

这个Hacker News的讨论主题是十进制下的右截断素数(RTP),起因是一个GitHub项目。一位评论者指出,这样的素数只有83个,因为最大的一个(73939133)无法在其后添加1、3、7或9而仍然保持素数性质。这个原理也适用于其他8位数的RTP,因此不可能存在更长的RTP。另一位评论者链接到一个Project Euler问题,该问题与从左到右都可截断的素数有关。一位用户建议探索二进制下的RTP,修改规则允许“钻过”尾随的零,这意味着可能存在一个与费马素数相关的无限集合,这与十进制下有限集合的结论不同。这种二进制下的重新定义,由于“钻零”规则的引入,产生了无限的分支。

相关文章
  • 2025-05-26
  • (评论) 2025-03-22
  • 2025-05-27
  • 2025-05-15
  • (评论) 2025-05-26

  • 原文
    Hacker News new | past | comments | ask | show | jobs | submit login
    Right-Truncatable Prime Counter (github.com/ebodshojaei)
    9 points by rainmans 1 day ago | hide | past | favorite | 5 comments










    Just in case any else is wondering: there are only 83 right-truncatable primes (RTP) and that is it. There's two constraints that let you see this "immediately":

    1. An RTP must start with {2,3,5,7,9}; and,

    2. An RTP must end with {1,3,7,9}.

    So, let's take the largest RTP (73939133) and try to "extend" it: there are only four possible extensions: 73939133[1], 73939133[3], 73939133[7], 73939133[9]. None of these are prime. This holds for the other 8-digit RTPs. Therefore, there is no extension to a 9-or-longer RTP. Thus, the list is exhaustive.



    There's a Project Euler problem for finding truncatable prime numbers, from both left and right: https://projecteuler.net/problem=37


    Curious about base 2. Obviously if you hit a 0 it's immediately not prime, but maybe adjust the rules so:

    - you drill through as many 0's on the right.

    - you finish on 1.

    3, 5, 7, 11, 13, 15, 17 are all right truncatable, 19 is the first non-truncatable prime in this scheme.



    i dont think smaller radixes make the problem more interesting. the problem is interesting because base 10 has a large branching factor


    I think in the base2 reformulation I propose we do not know for certain if the list of numbers terminates, as all Fermat primes are in the set and we don't know if there are infinitely many Fermat primes.

    For base-10 and the original rules the set is provably closed.

    "Drilling through zeros" makes the branching unbounded.







    Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



    Search:
    联系我们 contact @ memedata.com