login
Prime numbers which cannot become prime by removing any number of initial binary digits.
2

%I #23 Jul 29 2024 15:58:00

%S 2,3,5,17,41,73,89,97,137,193,257,281,313,409,521,569,577,641,673,761,

%T 929,953,1033,1049,1153,1289,1409,1657,1721,1801,1913,2081,2113,2297,

%U 2593,2713,3137,3257,3361,3449,3617,4129,4153,4217,4481,4513,4729,4793,4993,5113,5153

%N Prime numbers which cannot become prime by removing any number of initial binary digits.

%C In binary: 10, 11, 101, 10001, 101001, 1001001, 1011001, 1100001, 10001001, 11000001, 100000001, 100011001, 100111001, 110011001, 1000001001, 1000111001, 1001000001, 1010000001, ....

%C Smallest k > 1 such that n written in base k that cannot become prime (written in base k) by chopping off any of the initial consecutive digits: 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, 5, 2, 3, 5, 3, 2, 2, 3, 3, 2, 5, 3, 11, 2, 2, 5, 3, 2, 5, 6, 3, 2, 2, 5, 5, 2, 3, 8, 5, 2, 2, 3, 7,...

%H Harvey P. Dale, <a href="/A211972/b211972.txt">Table of n, a(n) for n = 1..1000</a>

%e 89 = 1011001_2 qualifies because none of 11001_2, 1001_2, and 1_2 are prime.

%t cbpQ[n_]:=NoneTrue[FromDigits[#,2]&/@With[{id=Rest[IntegerDigits[n,2]]},NestList[Rest[#]&, id,Length[id]-1]],PrimeQ]; Select[Prime[Range[700]],cbpQ] (* _Harvey P. Dale_, Jul 29 2024 *)

%o (PARI) A053644(n)=my(k=1); while(k<=n, k<<=1); k>>1

%o is(n)=isprime(n)&&while(n-=A053644(n), if(isprime(n),return(0))); 1

%o \\ _Charles R Greathouse IV_, Feb 20 2013

%Y Cf. A004676, A007088-A007095, A196095.

%K nonn,base

%O 1,1

%A _Irina Gerasimova_, Feb 13 2013