A036932 Smallest n-digit prime containing only digits 1 and 5, or 0 if no such prime exists.
5, 11, 151, 1151, 11551, 115151, 1111151, 15511151, 111151511, 1111115111, 11111151551, 111111111511, 1111111155151, 11111111511151, 111111111155111, 1111111111155151, 11111111111115151, 111111111115151551
Offset: 1
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..500
Programs
-
Mathematica
Table[SelectFirst[FromDigits/@Tuples[{1,5},n],PrimeQ],{n,20}] (* Harvey P. Dale, Aug 04 2019 *)
Extensions
Corrected by Harvey P. Dale, Mar 19 2013