login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A036929 Smallest n-digit prime containing only digits 0 and 1, or 0 if no such prime exists. 6

%I #9 Mar 09 2020 09:12:22

%S 0,11,101,0,10111,101111,1011001,10010101,100100111,1000001011,

%T 10000001101,100000001111,1000000111001,10000000001011,

%U 100000000100101,1000000000011101,10000000000001101,100000000000100111

%N Smallest n-digit prime containing only digits 0 and 1, or 0 if no such prime exists.

%H Jinyuan Wang, <a href="/A036929/b036929.txt">Table of n, a(n) for n = 1..500</a>

%o (PARI) a(n) = for(k=2^(n-1), 2^n-1, v=binary(k); if(ispseudoprime(p=fromdigits(v)), return(p))); 0; \\ _Jinyuan Wang_, Mar 09 2020

%Y Cf. A020449, A036229, A036928.

%K nonn,base

%O 1,2

%A _Patrick De Geest_, Jan 04 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)