OFFSET
1,2
COMMENTS
Note that all terms after the first are divisible by 144: for n>1 the sequence b(n) = sqrt(a(n)/144) is 1, 3, 5, 35, 33, 144, 80, 137, 285, 363, 387, 351, 204, 935, 225, 241, 289, ..., see A261659.
The proof that all terms are == 0 (mod 144) is simple once you realize that the primes == 11 (mod 72), see comment in A056899. - Robert G. Wilson v, Sep 03 2015
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1100
EXAMPLE
MAPLE
q:=2:for n from 1 to 10^7 do:p:=n^2+2:if isprime(p) then x:=p-q:q:=p: z:=sqrt(x):if z=floor(z) then printf(`%d, `, x):else fi:fi:od:
MATHEMATICA
Select[ Differences[ Select[ Range[0, 1000000], PrimeQ[#^2 + 2] &]^2], IntegerQ@ Sqrt@# &] (* or *)
k = 1; p = 3; lst = {1}; While[k < 10000001, q = (6k +3)^2 + 2; If[ PrimeQ@ q, If[ IntegerQ@ Sqrt[q - p], AppendTo[lst, q - p]]; p = q]; k++] (* Robert G. Wilson v, Sep 03 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 28 2015
STATUS
approved