A260830 Primes having only {5, 7, 8} as digits.
5, 7, 557, 577, 587, 757, 787, 857, 877, 887, 5557, 5857, 7577, 7757, 7877, 8887, 55787, 57557, 57587, 57787, 58757, 58787, 75557, 75577, 75787, 77557, 77587, 78577, 78787, 78857, 78877, 78887, 85577, 87557, 87587, 87877, 87887, 555557, 555857, 557857, 558587
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019)
- Index to entries for primes with digits in a given set
Programs
-
Magma
[p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [5,7,8]];
-
Mathematica
Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {5, 7, 8}] == {} &] Select[Flatten[Table[FromDigits/@Tuples[{5,7,8},n],{n,6}]],PrimeQ] (* Harvey P. Dale, Oct 06 2017 *)
Comments