A284292 Primes containing a digit 8.
83, 89, 181, 281, 283, 383, 389, 487, 587, 683, 787, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 983, 1087, 1181, 1187, 1283, 1289, 1381, 1481, 1483, 1487, 1489, 1583, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Magma
[p: p in PrimesUpTo(10000) | 8 in Intseq(p)];
-
Maple
isA284292 := proc(n) if isprime(n) then convert(convert(n,base,10),set) ; if 8 in % then true; else false; end if; else false; end if; end proc: for n from 1 to 2000 do if isA284292(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Mar 27 2017
-
Mathematica
Select[Prime@ Range@ 500, MemberQ[ IntegerDigits@ #, 8] &] (* Giovanni Resta, Mar 25 2017 *)
-
Python
from sympy import primerange print([n for n in primerange(2, 2000) if '8' in str(n)]) # Indranil Ghosh, Mar 25 2017
Comments