login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345238
a(n) is the number of primes of the form prime(n)+2^k for 2^k < prime(n).
3
1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 0, 3, 3, 2, 1, 0, 1, 2, 2, 2, 2, 2, 0, 2, 2, 1, 0, 4, 1, 1, 3, 1, 1, 3, 1, 3, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 2, 0, 1, 3, 0, 2, 3, 1, 1, 2, 2, 2, 1, 2, 3, 2, 1, 0, 2, 2, 1, 2, 0, 2, 3, 2, 0, 2, 1, 3, 1, 2, 1, 2, 2, 1, 3, 1, 2, 3, 3, 2, 1, 1, 2, 1
OFFSET
1,5
LINKS
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