OFFSET
1,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..51
MAPLE
f:= proc(n) local k;
for k from (n mod 2)+1 by 2 do
if isprime(n+k) and isprime(n+k^2) then return k fi
od
end proc:
f(1):= 1:
vmax:= 0: recinds:= NULL:
for n from 1 to 10^7 do
v:= f(n);
if v > vmax then
vmax:= v; recinds:= recinds, n;
fi
od:
recinds;
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Feb 02 2018
EXTENSIONS
a(34)-a(38) from Chai Wah Wu, Sep 10 2019
STATUS
approved