login
A093312
Least k such that (2n + 2k) + 1 and (2n*2k) + 1 are both primes.
2
1, 9, 3, 1, 3, 3, 1, 3, 2, 1, 9, 2, 1, 6, 3, 4, 6, 8, 10, 3, 5, 1, 3, 2, 1, 3, 12, 1, 15, 5, 13, 9, 3, 1, 18, 3, 4, 3, 2, 4, 33, 2, 1, 12, 3, 7, 6, 3, 1, 3, 2, 16, 15, 2, 13, 9, 17, 25, 15, 5, 4, 6, 26, 1, 9, 8, 1, 30, 5, 16, 3, 2, 1, 15, 6, 7, 12, 3, 7, 15, 5, 7, 3, 2, 4, 3, 12, 1, 6, 5, 7, 36, 3, 22
OFFSET
1,2
LINKS
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
Cf. A093481.
Sequence in context: A010159 A097528 A065416 * A154629 A333182 A154489
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 14 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004
STATUS
approved