login
A036934
Smallest n-digit prime containing only digits 1 and 7, or 0 if no such prime exists.
2
7, 11, 0, 1117, 11117, 0, 1111711, 11111117, 0, 1111117171, 11111111771, 0, 1111111111177, 11111111171177, 0, 1111111111171177, 11111111111111171, 0, 1111111111111111111, 11111111111111117111, 0, 1111111111111111111711
OFFSET
1,1
LINKS
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{1, 7}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 04 1999
EXTENSIONS
a(16) corrected by Jinyuan Wang, Mar 09 2020
STATUS
approved