A385782 Primes having only {1, 6, 8} as digits.
11, 61, 181, 661, 811, 881, 1181, 1811, 1861, 6661, 8111, 8161, 8681, 8861, 11161, 11681, 16111, 16661, 16811, 18181, 18661, 61681, 61861, 66161, 68111, 68161, 68611, 68881, 81181, 81611, 86111, 86161, 86861, 88661, 88681, 88811, 88861, 111611, 116681, 116881
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 6, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 6, 8}, n], PrimeQ], {n, 7}]] Select[10Flatten[Table[FromDigits/@Tuples[{1,6,8},n],{n,5}]]+1,PrimeQ] (* Harvey P. Dale, Aug 27 2025 *)
-
PARI
primes_with(, 1, [1, 6, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("168"), 41))) # uses function/imports in A385776