OFFSET
0,1
COMMENTS
a(n) = A340117(n-1) for n >= 3.
LINKS
Robert Israel, Table of n, a(n) for n = 0..1000
EXAMPLE
a(3) = 5 because 5 is prime, the next prime is 7, 7^2-5^2 = 24 = 2^3*3, and this is the first prime p in which 2^3 appears in the factorization of q^2-p^2.
MAPLE
g:= proc(m) local k, p;
for k from 2^(m-2) by 2^(m-1) do
p:= prevprime(k);
if nextprime(p) = 2*k-p then return p fi
od
end proc:
g(0):= 2: g(1):= 0: g(2):= 0: g(3):= 5:
map(g, [$0..30]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 28 2020
STATUS
approved