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”).

A036943
Smallest n-digit prime containing only the digits 3 and 8, or 0 if no such prime exists.
1
3, 83, 383, 3833, 38333, 333383, 3333383, 38383883, 333388333, 3333333833, 33333333833, 333338838383, 3333333333383, 33333333888383, 333333333388883, 3333333333838883, 33333333333833383, 333333333333333833
OFFSET
1,1
LINKS
MATHEMATICA
Table[SelectFirst[FromDigits[Join[#, {3}]]&/@Tuples[{3, 8}, n], PrimeQ], {n, 0, 20}] /.Missing["NotFound"]->0 (* Harvey P. Dale, Aug 27 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 04 1999
STATUS
approved