Primes with initial digits - errors

Ray Chandler rayjchandler at sbcglobal.net
Thu Jan 18 03:04:38 CET 2007


 
>   I agree with only A065587. I hope that someone who knows Mathematica
>   will edit. (I guess that even the A065587 code is wrong.)


The code is incorrect for A065584 - A065592.  The code given for A065587 would generate 44444444444444444119 for a(17)
whereas the value should be 4444444444444444409.

The original code for A065585-592 implicitly assumes (as Franklin surmised) that the digit following the n-th k is not
zero.  In addition it failed to check the concatenation of n k's for primeness before appending additional digits.  As a
result it missed single digit primes (as Don indicated) and repunit primes.  The code was amended on A065584 to correct
for specific repunit primes at a(2), a(19) and a(23), but fails to address the digit following n-th k being zero.  The
PARI code on A065584 as explained in the comments also fails for cases where the digit following the n-th k is zero.  

A number of the sequences A065584 - A065592 have offset 0 rather than 1.  It makes sense to me to make them consistent.

I have Mathematica code that generates corrected sequences consistent with values previously given by Don.  

Ray Chandler







More information about the SeqFan mailing list