[seqfan] Re: Question on primes

Maximilian Hasler maximilian.hasler at gmail.com
Wed Jun 10 14:26:50 CEST 2009


On Wed, Jun 10, 2009 at 6:30 AM, Creighton Kenneth Dement wrote:
> A(n) = number of primes p less than A000040(n) (the n-th prime) such that
> (p + 1)*(A000040(n) - 1) is a square.
>
> By hand, I believe the sequence would start off
> 0, 0, 1, 1, 0, 2, ...

? 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,




More information about the SeqFan mailing list