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.

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.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jul 28 2025

Keywords

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.
		

Crossrefs

Set difference of A137985 and A065092.

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 *)

Formula

{ A137985 } minus { A065092 }.