A318940 Primes whose binary representation contains a consecutive string of zeros of prime length.
17, 19, 37, 41, 71, 73, 79, 83, 89, 101, 103, 113, 131, 137, 139, 149, 151, 157, 163, 167, 179, 193, 197, 199, 211, 227, 229, 233, 241, 257, 263, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 359, 397, 401, 409, 419, 421, 433, 449, 457
Offset: 1
Links
- Charlie Neder, Table of n, a(n) for n = 1..949
Crossrefs
A subsequence of A319302, which suggested this sequence.
Programs
-
Mathematica
Prime@ Position[Array[If[Length@ # == 0, {0}, Length /@ #] &@ DeleteCases[Split@ IntegerDigits[Prime@ #, 2], ?(First@ # == 1 &)] &, 100], ?(AnyTrue[#, PrimeQ] &), {1}, Heads -> False][[All, 1]] (* Michael De Vlieger, Nov 25 2018 *) brpQ[p_]:=AnyTrue[Length/@Select[Split[IntegerDigits[p,2]],#[[1]]==0&],PrimeQ]; Select[Prime[Range[100]],brpQ] (* Harvey P. Dale, Jul 30 2025 *)
-
PARI
ok(n)={if(isprime(n), while(n, my(t=valuation(n,2)); if(isprime(t), return(1)); n >>= t + 1)); 0} \\ Andrew Howroyd, Nov 09 2018
Extensions
More terms from Charlie Neder, Sep 17 2018
Comments