cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A353137 Primes whose gaps to both neighbor primes are powers of two.

This page as a plain text file.
%I A353137 #17 May 14 2022 11:23:49
%S A353137 3,5,7,11,13,17,19,41,43,71,97,101,103,107,109,193,197,227,229,281,
%T A353137 311,313,349,397,401,457,461,463,487,491,499,617,643,743,761,769,823,
%U A353137 827,857,859,881,883,911,937,1091,1093,1279,1301,1303,1427,1429,1447,1451
%N A353137 Primes whose gaps to both neighbor primes are powers of two.
%H A353137 Alois P. Heinz, <a href="/A353137/b353137.txt">Table of n, a(n) for n = 1..10000</a>
%e A353137 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.
%p A353137 p2:= proc(n) option remember; is(n=2^ilog2(n)) end:
%p A353137 q:= n-> isprime(n) and andmap(p2, [n-prevprime(n), nextprime(n)-n]):
%p A353137 select(q, [$3..3000])[];
%t A353137 p2[n_] := n == 2^Floor[Log2[n]];
%t A353137 q[n_] := PrimeQ[n] && p2[n-NextPrime[n, -1]] && p2[NextPrime[n]-n];
%t A353137 Select[Range[3, 3000], q] (* _Jean-François Alcover_, May 14 2022, after _Alois P. Heinz_ *)
%Y A353137 Cf. A000040, A000079, A353088, A353135, A353136.
%K A353137 nonn
%O A353137 1,1
%A A353137 _Alois P. Heinz_, Apr 25 2022