A020456 Primes that contain digits 1 and 8 only.
11, 181, 811, 881, 1181, 1811, 8111, 18181, 81181, 88811, 1111181, 1181881, 1881181, 1881811, 1881881, 8118181, 8181881, 8188111, 8188181, 8818811, 8881111, 8881811, 11818181, 11881811, 11888111, 18111881, 18118811, 18181181, 18811181, 18888811
Offset: 1
Links
- Jason Bard, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi)
Programs
-
Magma
[p: p in PrimesUpTo(18888811) | Set(Intseq(p)) subset [1, 8]]; // Vincenzo Librandi, Jul 27 2012
-
Mathematica
Flatten[Table[Select[FromDigits/@Tuples[{1,8},n],PrimeQ],{n,8}]] (* Vincenzo Librandi, Jul 27 2012 *)