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.

This page as a plain text file.
%I A385245 #21 Aug 05 2025 06:07:55
%S A385245 223,257,509,787,853,877,1259,1451,1973,2917,3511,5099,6287,6521,7841,
%T A385245 8171,8923,9319,10567,11353,12517,12637,12763,13687,14107,14629,15217,
%U A385245 15607,16943,17519,18089,18593,18743,19139,20183,20393,20639,21701,22943,26591,26891
%N 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.
%H A385245 Alois P. Heinz, <a href="/A385245/b385245.txt">Table of n, a(n) for n = 1..10000</a>
%F A385245 { A137985 } minus { A065092 }.
%e A385245 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.
%p A385245 q:= p-> (m-> andmap(isprime, [p, 2^(m+1)+p]) and not ormap
%p A385245         (i->isprime(Bits[Xor](p, 2^i)), [$0..m]))(ilog2(p)):
%p A385245 select(q, [$2..27000])[];
%t A385245 Select[Prime[Range[3000]], PrimeQ[2^BitLength[#] + #] && NoneTrue[BitXor[#, 2^Range[0, BitLength[#] - 1]], PrimeQ] &] (* _Paolo Xausa_, Aug 05 2025 *)
%Y A385245 Set difference of A137985 and A065092.
%Y A385245 Cf. A000040, A002808.
%K A385245 nonn,base
%O A385245 1,1
%A A385245 _Alois P. Heinz_, Jul 28 2025