login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A108656
Least a(n)>0 such that a(n-2)*n^2+a(n-1)*n+a(n) is a prime.
2
2, 3, 2, 3, 2, 7, 2, 3, 2, 11, 4, 5, 2, 1, 2, 5, 10, 1, 2, 3, 2, 3, 2, 1, 2, 5, 4, 17, 6, 13, 4, 1, 2, 5, 8, 11, 10, 3, 2, 9, 2, 11, 6, 3, 4, 15, 6, 1, 6, 1, 4, 5, 2, 11, 4, 1, 10, 3, 36, 7, 16, 1, 10, 15, 12, 5, 14, 5, 4, 1, 14, 5, 40, 1, 2, 11, 8, 11, 24, 17, 2, 1, 12, 5, 8, 23, 10, 29, 8, 1, 4, 5
OFFSET
1,1
COMMENTS
Corresponding primes in A108657.
LINKS
EXAMPLE
a(1)=2, a(2)=3 and a(3)=2 because 2*3^2+3*3+2=29 is aprime; a(4)=3, a(5)=2 and a(6)=7 because 3*6^2+2*6+7=127 is a prime.
MATHEMATICA
a=2; b=3; s={a, b}; Do[c=Prime[PrimePi[a*n^2+b*n]+1]-a*n^2-b*n; AppendTo[s, c]; a=b; b=c, {n, 3, 200}]; A108656=s
nxt[{n_, a_, b_}]:=Module[{c=a(n+1)^2+b(n+1)}, {n+1, b, NextPrime[c]-c}]; Join[{2}, Transpose[NestList[nxt, {2, 2, 3}, 100]][[3]]] (* Harvey P. Dale, Dec 17 2013 *)
CROSSREFS
Cf. A108657.
Sequence in context: A318620 A287748 A260233 * A164962 A251089 A119880
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 14 2005
STATUS
approved