A038618 Primes not containing the digit '0'.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- René-Louis Clerc, Nombres premiers primaires et nombres premiers secondaires , 2025.
- M. F. Hasler, Numbers avoiding certain digits, OEIS Wiki, Jan 12 2020.
- James Maynard, Primes with restricted digits, arXiv:1604.01041 [math.NT], 2016.
- James Maynard and Brady Haran, Primes without a 7, Numberphile video (2019).
- Eric Weisstein's World of Mathematics, Zerofree.
- Index to entries for primes with digits in a given set
Crossrefs
Programs
-
Haskell
a038618 n = a038618_list !! (n-1) a038618_list = filter ((== 1) . a168046) a000040_list -- Reinhard Zumkeller, Apr 07 2014, Sep 27 2011
-
Magma
[ p: p in PrimesUpTo(300) | not 0 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
-
Mathematica
Select[Prime[Range[70]], DigitCount[#, 10, 0] == 0 &] (* Vincenzo Librandi, Aug 09 2011 *)
-
PARI
is(n)=if(isprime(n),n=vecsort(eval(Vec(Str(n))),,8);n[1]>0) \\ Charles R Greathouse IV, Aug 09 2011
-
PARI
lista(nn) = forprime (p=2, nn, if (vecmin(digits(p)), print1(p, ", "))); \\ Michel Marcus, Apr 06 2016
-
PARI
next_A038618(n)=until(vecmin(digits(n=nextprime(next_A052382(n)))),);n \\ Cf. OEIS Wiki page (LINKS) for other programs. - M. F. Hasler, Jan 12 2020
-
Python
from sympy import primerange def aupto(N): return [p for p in primerange(1, N+1) if '0' not in str(p)] print(aupto(300)) # Michael S. Branicky, Mar 11 2022
Formula
Intersection of A052382 (zeroless numbers) and A000040 (primes); A168046(a(n))*A010051(a(n)) = 1. - Reinhard Zumkeller, Dec 01 2009
a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023
Comments