A386119 Primes having only {1, 4, 5, 6} as digits.
5, 11, 41, 61, 151, 461, 541, 641, 661, 1151, 1451, 1511, 4111, 4441, 4451, 4561, 4651, 5441, 5641, 5651, 6151, 6451, 6551, 6661, 11161, 11411, 11551, 14411, 14461, 14551, 14561, 15161, 15451, 15461, 15511, 15541, 15551, 15641, 15661, 16111, 16141, 16411, 16451
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 5, 6]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 5, 6}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 4, 5, 6]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1456"), 41))) # uses function/imports in A385776