Title: | Mathematics at DEC |
Moderator: | RUSURE::EDP |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2083 |
Total number of notes: | 14613 |
How far can you build onto a single-digit prime number by adding single digits to the left and still have prime numbers? For example: 7 37 137 No zeros, please.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1537.1 | ZFC::deramo | Dan D'Eramo | Fri Jan 03 1992 18:18 | 3 | |
I know the answer for 2 and 5. :-) Dan | |||||
1537.2 | ZFC::deramo | Dan D'Eramo | Fri Jan 03 1992 20:26 | 24 | |
At one digit there are four primes. These extend to eleven two-digit primes that end with one digit primes. These extend to 39 three-digit primes that end with...etc. length count ------ ----- 1 4 2 11 3 39 4 99 5 192 6 326 7 429 8 521 Of the 521 eight-digit primes, 283 ended with 3 and 238 ended with 7. I expect, of course, the counts to peak then decline and that there is a length n at and beyond which the counts are all zero. Dan p.s. For all of you fans of Konig's Lemma, it would apply here if the counts were nonzero for every length. :-) | |||||
1537.3 | ZFC::deramo | Dan D'Eramo | Thu Jan 09 1992 19:06 | 20 | |
re .2, > length count > ------ ----- > 1 4 > 2 11 > 3 39 > 4 99 > 5 192 > 6 326 > 7 429 > 8 521 I extended the table to 9 545 10 517 11 448 Dan | |||||
1537.4 | CLT::TRACE::GILBERT | Ownership Obligates | Tue Jan 28 1992 14:05 | 1 | |
The longest one is this 24-digit prime: 357686312646216567629137. | |||||
1537.5 | !!! | CIVAGE::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Tue Jan 28 1992 14:37 | 9 |
> The longest one is this 24-digit prime: 357686312646216567629137. Good stuff! Now if you start trimming digits from the *right* end of this number, the first prime you run into is 3576863. However, there is 3576863126462165676291 = 3 * 1192287708820721892097. Close! What method/program did you use to get the result? | |||||
1537.6 | CLT::KOBAL::GILBERT | Ownership Obligates | Wed Jan 29 1992 16:51 | 5 | |
I'm a bit ashamed to admit that I wasted considerable time *factoring* all these numbers, when all that was required was determining primality, but I used Hallyburton's FACTOR program. After one 'length' of numbers were factored, the primes were found in the output, digits prefixed, and these slightly longer numbers fed back into FACTOR. | |||||
1537.7 | The whoooole thing | CIVAGE::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Thu Jan 30 1992 17:29 | 62 |
The complete table is: length count ------ ----- 1 4 2 11 3 39 4 99 5 192 6 326 7 429 8 521 9 545 10 517 11 448 12 354 13 276 14 212 15 117 16 72 17 42 18 24 19 13 20 6 21 5 22 4 23 3 24 1 25 0 The complete list of all extended primes is generated by the following MAPLE program, in about 30 min on my VS3520: # EXTEND.MAPLE # # tenx is a procedure to compute n+10^(digits in n)*[1..9] # Ex: tenx(35) = 135,235,335,435,535,635,735,835,935 #====================================================================== tenx := proc (n) local i; n + i*p10 $i=1..9 end; primes_only := proc(xlist) local i, plist; plist := []; for i from 1 to nops(xlist) do; if isprime(xlist[i]) then plist := [op(plist), xlist[i]] fi; od; plist end; p10 := 10; prlist := primes_only([i$i=1..9]); for k from 1 to 25 do: xlist := []: for i from 1 to nops(prlist) do: xlist := [op(xlist), tenx(prlist[i])]: od: prlist := primes_only(xlist): lprint(prlist, nops(prlist)); p10:=p10*10: od: | |||||
1537.8 | left-primes: the opposite problem | CIVAGE::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Mon Feb 03 1992 11:13 | 24 |
The following is the complete list of all "left"-primes; if you delete digits from the right the "left" of the number is still prime. The number outside the brackets is the count for each group. [2, 3, 5, 7] 4 [23, 29, 31, 37, 53, 59, 71, 73, 79] 9 [233, 239, 293, 311, 313, 317, 373, 379, 593, 599, 719, 733, 739, 797] 14 [2333, 2339, 2393, 2399, 2939, 3119, 3137, 3733, 3739, 3793, 3797, 5939, 7193, 7331, 7333, 7393] 16 [23333, 23339, 23399, 23993, 29399, 31193, 31379, 37337, 37339, 37397, 59393, 59399, 71933, 73331, 73939] 15 [233993, 239933, 293999, 373379, 373393, 593933, 593993, 719333, 739391, 739393, 739397, 739399] 12 [2339933, 2399333, 2939999, 3733799, 5939333, 7393913, 7393931, 7393933] 8 [23399339, 29399999, 37337999, 59393339, 73939133] 5 [] 0 | |||||
1537.9 | Some oddities | CIV009::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Mon Apr 06 1992 15:33 | 7 |
Buried in the long list of right-primes is the remarkable palindrome 799636997 The largest number that is both left- and right-prime is 739397 | |||||
1537.10 | query | SGOUTL::BELDIN_R | Pull us together, not apart | Mon Apr 06 1992 16:24 | 15 |
Re: <<< Note 1537.9 by CIV009::LYNN "Lynn Yarbrough @WNP DTN 427-5663" >>> > -< Some oddities >- > >Buried in the long list of right-primes is the remarkable palindrome > > 799636997 > >The largest number that is both left- and right-prime is > > 739397 Do you mean absolutely "the largest", or "the largest in some list"? Dick | |||||
1537.11 | Both lists | GLENN::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Mon Apr 06 1992 18:28 | 6 |
> Do you mean absolutely "the largest", or "the largest in some list"? I have a complete list of both the left- and right-primes (the list of 83 left-primes appears a couple of notes back; if you really want to see the complete list of 4260 right-primes I will mail it). The number I cited is the largest integer that appears in both lists. | |||||
1537.12 | Original it's not | CIV009::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Mon May 04 1992 11:21 | 5 |
This topic has already appeared in the Journal of Recreational Math (JRM), as early as 1970. Harry Nelson, one of the JRM editors, has also written about nests of primes, in which digits are added on *both* ends, and including two 71-digit primes built that way. The 24-digit prime Peter cites early on also appeared in *Mathematics of Computation* back in 1977. | |||||
1537.13 | Adding more insight | CIV009::LYNN | Lynn Yarbrough @WNP DTN 427-5663 | Mon May 04 1992 11:58 | 24 |
>>The largest number that is both left- and right-prime is >> >> 739397 > Do you mean absolutely "the largest", or "the largest in some list"? I was showing off the MAPLE program that does this stuff at a trade show a few weeks back and one customer refused to believe that there are only finitely many of these things, so perhaps further explanation is in order. The process is exhaustive: the program starts with 2,3,5, and 7 and builds upon them as four branches of a tree. Each branch of the tree grows when adding a digit produces another prime, and stops growing (e.g. the 2- and 5- branches) when all 9 of its extensions are composite. The whole tree stops growing at the 24-digit prime. Any prime not in the tree is easy to disqualify by starting at the right and comparing: the rightmost substring not in the tree has been tested by the program and found to be composite. The number of primes at each level of the tree, plotted against level, looks very much like a Beta Probability Density Function. I suspect that an analysis of the expected number of primes generated by such a process would predict such a distribution (or perhaps a Poisson distribution), but I'm not up to doing the analysis. ... challenge to the reader? |