login
A087566
a(n) = index of the first occurrence of n in A087565, or 0 if n is not a term of A087565.
1
1, 3, 9, 0, 7, 26, 32, 35, 29, 11, 109, 31, 95, 43, 394, 67, 127, 23, 55, 224, 107, 265, 237, 92, 158, 386, 233, 989, 401, 1229, 714, 197, 380, 384, 541, 142, 179, 376, 908, 149, 723, 963, 169, 2187, 909, 919, 519, 360, 674, 1376, 636, 643, 2468, 1284, 504, 781
OFFSET
0,2
COMMENTS
Smallest k such that n is the smallest number for which k*(k+1)*(k+2)...(k+n) + 1 is prime.
a(3) = 0 since 3 is not a term of A087565 because k*(k+1)*(k+2)*(k+3) + 1 is a square for every k.
EXAMPLE
a(1) = 3 since 1+1 is prime, 2+1 is prime, 3+1 is composite, 3*(3+1)+1 = 13 is prime.
PROG
(PARI) {p=55; a=2500; v=vector(p+1); for(n=1, a, k=0; m=n; while(!isprime(m+1, 1)&& k<=p+1, k++; m=m*(n+k)); if(k<=p, if(v[k+1]<1, v[k+1]=n))); for(j=1, p+1, print1(v[j], ", "))}
CROSSREFS
Sequence in context: A019832 A244337 A338033 * A011337 A195456 A021723
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 15 2003
EXTENSIONS
Edited and extended by Klaus Brockhaus, Sep 20 2003
STATUS
approved