|
|
A036929
|
|
Smallest n-digit prime containing only digits 0 and 1, or 0 if no such prime exists.
|
|
6
|
|
|
0, 11, 101, 0, 10111, 101111, 1011001, 10010101, 100100111, 1000001011, 10000001101, 100000001111, 1000000111001, 10000000001011, 100000000100101, 1000000000011101, 10000000000001101, 100000000000100111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|