A385245 Primes that are no longer prime if in their binary representation any single bit is flipped but stay prime if a 1 bit is prepended.
223, 257, 509, 787, 853, 877, 1259, 1451, 1973, 2917, 3511, 5099, 6287, 6521, 7841, 8171, 8923, 9319, 10567, 11353, 12517, 12637, 12763, 13687, 14107, 14629, 15217, 15607, 16943, 17519, 18089, 18593, 18743, 19139, 20183, 20393, 20639, 21701, 22943, 26591, 26891
Offset: 1
Examples
257 = 100000001_2 and 769 = 1100000001_2 are primes and 256, 259, 261, 265, 273, 289, 321, 385, 1 are not prime. So 257 is a term.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
q:= p-> (m-> andmap(isprime, [p, 2^(m+1)+p]) and not ormap (i->isprime(Bits[Xor](p, 2^i)), [$0..m]))(ilog2(p)): select(q, [$2..27000])[];
-
Mathematica
Select[Prime[Range[3000]], PrimeQ[2^BitLength[#] + #] && NoneTrue[BitXor[#, 2^Range[0, BitLength[#] - 1]], PrimeQ] &] (* Paolo Xausa, Aug 05 2025 *)