OFFSET
1,5
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 2 because prime(5) = 11 and 11+2^1 = 13 and 11+2^3 = 19 are prime.
MAPLE
f:= proc(n) local p, k;
p:= ithprime(n);
nops(select(isprime, [seq(p+2^k, k=1..ilog2(p))]))
end proc:
f(1):= 1:
map(f, [$1..200]);
MATHEMATICA
Table[Length@Select[Table[Prime@n+2^k, {k, 0, Floor[Log2@Prime@n]}], PrimeQ], {n, 100}] (* Giorgos Kalogeropoulos, Jun 11 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jun 11 2021
STATUS
approved