OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A093481(n)/2.
EXAMPLE
a(4) = 1, 8 + 2*2 + 1 = 11 and 8*2*2 + 1 = 17 are both prime.
MAPLE
f:= proc(n) local k;
for k from 1 do if isprime(2*n+2*k+1) and isprime(4*n*k+1) then return k fi od
end proc:
map(f, [$1..100]); # Robert Israel, May 01 2023
MATHEMATICA
f[n_] := Block[{k = 1}, While[ !PrimeQ[2n + 2k + 1] || ! PrimeQ[2n*2k + 1], k++ ]; k]; Table[ f[n], {n, 95}] (* Robert G. Wilson v, Apr 24 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 14 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004
STATUS
approved