login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A036933
Smallest n-digit prime containing only digits 1 and 6, or 0 if no such prime exists.
1
0, 11, 661, 6661, 11161, 111611, 1111661, 11111161, 111616111, 1111161661, 11111111611, 111111111611, 1111111111661, 11111111616611, 111111111116111, 1111111111616161, 11111111111611661, 111111111111111161
OFFSET
1,2
LINKS
MATHEMATICA
Join[{0}, Flatten[Table[Select[Sort[FromDigits/@Tuples[{1, 6}, i]], PrimeQ, 1], {i, 2, 20}]]] (* Harvey P. Dale, May 06 2014 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 04 1999
STATUS
approved