![]() |
![]() |
#1 |
May 2004
New York City
23×232 Posts |
![]()
Finding primes in the digits of pi has been done,
so here is yet another primes in pi puzzle. For every positive integer n (in decimal) find the first occurrence in pi of the digits of that integer, then the first prime constructed from the subsequent digits of pi. Here's what I had in mind: __________________________________ 1 --> 14159 2 --> 2 3 --> 3 4 --> 41 5 --> 59 (*) 6 --> 653 7 --> 79 (*) 8 --> 89 9 --> 9265358979323 (or 97 ??) 10 -> 102701 (or 1058209749...6531873029<19128> ?) (PRP) 11 --> 11 12 --> 12847564823 (or 12848111...678925903<211> ?) ... 20 --> (...more than 215000-digit...) ... 62 --> 3490-digit Prime (and three more PRPs) 80 --> 41938-digit PRP. 81 --> 4834-digit PRP. 84 --> 3057-digit PRP. 96 --> 140165-digit PRP. 98 --> 61303-digit PRP. up to 100 (except 20): all primes/PRPs are less than 1000-digits or shown above __________________________________ (*) of course 2, 5 and 7 are prime (**) My calculator only checks for small factors, so * and ** may not actually be prime I think the list carried to (at least) 100 will possibly contain some more interestingly large primes, or will the prime-checking facility be tested only by going to 1000, or beyond? _______________ P.S. I could restore the original values for 2 and 10, but ... they were composite. You can easily see the original in post #2 (SB) Last fiddled with by Batalov on 2012-11-05 at 23:33 Reason: updated up to 100 (except 20) |
![]() |
![]() |
![]() |
#2 | |
Bamboozled!
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across
28·41 Posts |
![]() Quote:
Alternatively, those primes which begin with each of the digits <n in the radix-n representation of the primes and of \pi Paul Last fiddled with by xilman on 2012-07-15 at 19:09 |
|
![]() |
![]() |
![]() |
#3 |
"Patrik Johansson"
Aug 2002
Uppsala, Sweden
1101010012 Posts |
![]()
26535897932384626433 = 150917801 x 175830139033
1058209749445923078164062862089986280348253421170679821480865132823 = 196699 x 1834313671 x 4817619413830406641955201 x 608784400187359263779612387 |
![]() |
![]() |
![]() |
#4 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,257 Posts |
![]()
For 12, the value appears to be
Code:
1284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903 Makes one wonder that the first possible chain of digits might go without a prime (can it? on a simple probabilistic argument?), then the next one easily produces 102701 (*** same below) 13 --> 13 14 --> 14159 15 --> 1592653 16 --> 1693 17 --> 17 18 --> 1861 19 --> 19 20 --> 20................................... or 2089 (***) 21 --> 211 22 --> 223 Last fiddled with by Batalov on 2012-07-15 at 21:55 Reason: CODE added |
![]() |
![]() |
![]() |
#5 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
100100001010012 Posts |
![]()
There shouldn't be a probabilistic argument, really. (Silly me.)
On one hand, these candidates are not sparser than any quasi/near-repunits (one per a power of 10 - except for some series with algebraic compositeness), -- and we have tons of primes/PRPs for them. On the other hand, I actually found the 19128-digit PRP (easy to recontruct from Pi, code is below; decimal view: 1058209749...6531873029). Now we need a healthy volunteer to prove it; it would be a Primo record! Code:
# gp \p 20000 write("p10",floor(Pi*10^19176)%(10^19128)) \q pfgw -f -tc p10 Last fiddled with by Batalov on 2012-07-16 at 00:06 |
![]() |
![]() |
![]() |
#6 |
May 2004
New York City
23·232 Posts |
![]()
I appreciate the editing of my OP.
It was after all just a starting point. For the sake of completeness, since 10..... and 20..... are producing long sequences, it might be interesting to check 30....., 40....., etc. |
![]() |
![]() |
![]() |
#7 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,257 Posts |
![]()
I hoped that you wouldn't mind. Thank you for a nice problem!
30 and 40 turned out to be easy. 20 is still running empty (at least 9300 digits in it). In the meantime, I installed a shiny new Bosch dishwasher to please SWMBO. "Change of work is rest", they say? :-) EDIT: ...oh and for 2, I found a 50-digit prime, but then again, the mere "2" is already prime. Last fiddled with by Batalov on 2012-07-16 at 04:03 |
![]() |
![]() |
![]() |
#8 |
Sep 2005
127 Posts |
![]()
You're aware that the first prime-instance might not necessarily start at the first instance?
(this is the same mistake as Shallit made) J |
![]() |
![]() |
![]() |
#9 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
2×2,897 Posts |
![]()
The following pari code finds solutions for 2 digit starting points upto length 1000.
Code:
\p 20000 { found=0; for (n=10, 99, for (offset=0, 1000, if ((floor(Pi*10^(2+offset-1))%(10^2))==n, for (digits=2, 1000, f=factor(floor(Pi*10^(digits+offset-1))%(10^digits),9); if (matsize(f)==[1,2], if (ispseudoprime(floor(Pi*10^(digits+offset-1))%(10^digits),20), print(floor(Pi*10^(digits+offset-1))%(10^digits)); found=1; break; ); ); ); if (found==0, print("A solution has not been found for " n); ); found=0; break; ); ); ); } \q Code:
10 20 62 80 81 84 96 98 I will now write a script that produces input to pfgw for the harder numbers. Is there a way of redirecting the output from a pari script without getting things like the header as well? I am a bit of a pari novice. |
![]() |
![]() |
![]() |
#10 | |
Bamboozled!
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across
244008 Posts |
![]() Quote:
Here's how the Perl script which is used to update my factor table tests its argument for primality. Code:
# Primality testing function. # Initial sanity check to see whether Pari/gp is installed and working correctly. my $sc1 = `echo "isprime(1074884750872101952308847649628260864479,2)" | /usr/bin/gp -f -q`; # Known prime. my $sc2 = `echo "isprime(1074884750872101952308847649628260864481,2)" | /usr/bin/gp -f -q`; # Known composite. ($sc1 != 1 or $sc2 != 0) and die "Failed gp sanity check\n"; sub is_prime($) { my $num = shift; my $big_mem = length $num > 300 ? 'allocatemem(104857600);' : ''; return `echo "${big_mem}isprime($num,2)" | /usr/bin/gp -f -q ` == 1; } Paul Paul |
|
![]() |
![]() |
![]() |
#11 | |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,257 Posts |
![]() Quote:
How would you move on from the first instance to the next one? By proof? For example could you prove that there can not be a prime in these series: 1) 7019*10^n-1 or in 2) 8579*10^n-1. (subsequences of pi would be obviously harder) Yes, 2) is a trick proposition. There exists a prime. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mersenne Primes p which are in a set of twin primes is finite? | carpetpool | Miscellaneous Math | 3 | 2017-08-10 13:47 |
Distribution of Mersenne primes before and after couples of primes found | emily | Math | 34 | 2017-07-16 18:44 |
Conjecture about Mersenne primes and non-primes v2 | Mickey1 | Miscellaneous Math | 1 | 2013-05-30 12:32 |
A conjecture about Mersenne primes and non-primes | Unregistered | Information & Answers | 0 | 2011-01-31 15:41 |
possible primes (real primes & poss.prime products) | troels munkner | Miscellaneous Math | 4 | 2006-06-02 08:35 |