OFFSET
1,1
COMMENTS
In binary: 10, 11, 101, 10001, 101001, 1001001, 1011001, 1100001, 10001001, 11000001, 100000001, 100011001, 100111001, 110011001, 1000001001, 1000111001, 1001000001, 1010000001, ....
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,...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
89 = 1011001_2 qualifies because none of 11001_2, 1001_2, and 1_2 are prime.
MATHEMATICA
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 *)
PROG
(PARI) A053644(n)=my(k=1); while(k<=n, k<<=1); k>>1
is(n)=isprime(n)&&while(n-=A053644(n), if(isprime(n), return(0))); 1
\\ Charles R Greathouse IV, Feb 20 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Irina Gerasimova, Feb 13 2013
STATUS
approved