A386095 Primes having only {1, 2, 5, 6} as digits.
2, 5, 11, 61, 151, 211, 251, 521, 661, 1151, 1511, 1621, 2111, 2161, 2221, 2251, 2521, 2551, 2621, 5261, 5521, 5651, 6121, 6151, 6211, 6221, 6521, 6551, 6661, 11161, 11251, 11261, 11551, 11621, 12161, 12211, 12251, 12511, 12611, 15121, 15161, 15511, 15551, 15661
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 5, 6]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 5, 6}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 5, 6]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1256"), 41))) # uses function/imports in A385776