|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
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:
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|