A386100 Primes having only {1, 2, 6, 8} as digits.
2, 11, 61, 181, 211, 281, 661, 811, 821, 881, 1181, 1621, 1811, 1861, 2111, 2161, 2221, 2281, 2621, 2861, 6121, 6211, 6221, 6661, 8111, 8161, 8221, 8681, 8821, 8861, 11161, 11261, 11621, 11681, 11821, 12161, 12211, 12281, 12611, 12821, 16111, 16661, 16811, 18121
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 6, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 6, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 6, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1268"), 41))) # uses function/imports in A385776