[seqfan] Re: Question on primes

Creighton Kenneth Dement creighton.k.dement at mail.uni-oldenburg.de
Mon Jul 13 00:55:45 CEST 2009


Maximilian wrote:
> forprime(q=1,1000,my(q1=q-1,c=0);forprime(p=1,q-1,issquare((p+1)*q1)&c++);print1(c","))
>
> 0,0,1,1,0,2,1,2,0,0,1,1,0,1,0,0,0,1,0,0,4,0,0,0,3,1,1,0,4,0,1,0,0,1,0,4,0,6,0,0,0,3,0,5,1,1,0,0,0,1,0,0,2,1,1,0,0,2,0,0,1,0,0,0,1,0,0,1,0,1,1,0,0,0,2,0,0,1,1,1,0,1,0,6,0,0,1,1,0,1,0,0,6,2,0,0,0,0,1,2,0,0,0,0,1,1,0,0,0,7,0,2,0,1,0,2,1,0,0,0,1,2,1,0,0,1,0,0,7,0,0,0,3,1,0,7,0,0,0,0,3,0,1,0,2,0,0,0,1,0,0,0,13,0,0,0,1,1,2,0,0,0,0,0,0,0,2,0,

Note that upon calculating the first 30000 terms, the results range
between 0 and 140 and every number between 0 and 60 appears at least once
in the list with the exception of the number 49 which I am yet to find.
After 60, the numbers begin skipping, presumably because not enough terms
have been calculated.

Sorting the list returns
18890 0's
4229 1's
502 3's
282 4's
199 5's
...

As the ratios appear more or less stable, I wonder if for example (number
of 1's / number of 0's) might converge with increasing n.

Sincerely,
Creighton






______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>






More information about the SeqFan mailing list