OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
Prime 1447 is a term, the gap to the previous prime 1439 is 8 and the gap to the next prime 1451 is 4 and both gaps are powers of two.
MAPLE
p2:= proc(n) option remember; is(n=2^ilog2(n)) end:
q:= n-> isprime(n) and andmap(p2, [n-prevprime(n), nextprime(n)-n]):
select(q, [$3..3000])[];
MATHEMATICA
p2[n_] := n == 2^Floor[Log2[n]];
q[n_] := PrimeQ[n] && p2[n-NextPrime[n, -1]] && p2[NextPrime[n]-n];
Select[Range[3, 3000], q] (* Jean-François Alcover, May 14 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 25 2022
STATUS
approved