A036940 Smallest n-digit prime containing only digits 3 and 4, or 0 if no such prime exists.
3, 43, 433, 3343, 33343, 333433, 3333433, 34333333, 333334333, 3333334343, 33333333343, 333333343333, 3333333333433, 33333333433333, 333333333334343, 3333333333333343, 33333333333433433, 333333333333334343
Offset: 1
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..500
Programs
-
Mathematica
Table[SelectFirst[FromDigits/@Tuples[{3,4},n],PrimeQ],{n,18}] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 29 2015 *)