login
A260930
Differences between the numbers n such that n^2 + 2 is prime.
2
1, 2, 6, 6, 6, 12, 6, 6, 12, 24, 18, 6, 6, 6, 6, 24, 24, 48, 6, 12, 6, 6, 6, 18, 24, 6, 6, 12, 24, 6, 12, 6, 6, 12, 30, 6, 6, 12, 6, 6, 24, 24, 12, 36, 6, 6, 12, 30, 6, 42, 24, 6, 18, 12, 42, 24, 30, 12, 18, 30, 18, 12, 6, 6, 24, 24, 12, 12, 30, 24, 36, 42, 18
OFFSET
1,2
COMMENTS
Sequence A067201 has the values of n. This sequence is the first differences of A067201.
a(n) is divisible by 6 for n>2.
LINKS
Eric Weisstein's World of Mathematics, Near-Square Prime
EXAMPLE
a(6)=12 because A067201(7) - A067201(6) = 33 - 21 = 12.
MAPLE
i0:=0:
for k from 1 to 1500 do:
p:=k^2+2:
if isprime(p) then printf(`%d, `, k-i0):i0:=k:
else
fi:
od:
MATHEMATICA
Differences[Select[Range[1500], PrimeQ[2 + #^2] &, 100]]
PROG
(PARI) first(m)=my(u=vector(m+1), v=vector(m), r=0); for(i=1, m+1, while(!isprime(r^2 + 2), r++); u[i]=r; r++); for(i=1, m, v[i]=u[i+1]-u[i]); v; \\ Anders Hellström, Aug 14 2015
CROSSREFS
Cf. A056899 (primes of the form n^2+2), A067201 (values of n).
Sequence in context: A096014 A071888 A117217 * A161331 A120627 A089879
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 04 2015
STATUS
approved