A038603 Primes not containing the digit '1'.
2, 3, 5, 7, 23, 29, 37, 43, 47, 53, 59, 67, 73, 79, 83, 89, 97, 223, 227, 229, 233, 239, 257, 263, 269, 277, 283, 293, 307, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 409, 433, 439, 443, 449, 457, 463, 467, 479, 487, 499, 503, 509, 523, 547, 557
Offset: 1
Links
- Indranil Ghosh, Table of n, a(n) for n = 1..50000 (terms 1..1000 from R. Zumkeller)
- 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).
- Index to entries for primes with digits in a given set
Crossrefs
Programs
-
Magma
[ p: p in PrimesUpTo(600) | not 1 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
-
Mathematica
Select[Prime[Range[70]], DigitCount[#, 10, 1] == 0 &] (* Vincenzo Librandi, Aug 09 2011 *)
-
PARI
is(n)=if(isprime(n),n=vecsort(eval(Vec(Str(n))),,8);n[1]>1||(!n[1]&&n[2]>1)) \\ Charles R Greathouse IV, Aug 09 2011
-
PARI
is(n)=!vecsearch(vecsort(digits(n)),1) && isprime(n) \\ Charles R Greathouse IV, Oct 03 2012
-
PARI
next_A038603(n)=until((n=nextprime(n+1))==n=next_A052383(n-1),);n \\ Compute least a(k) > n. See A052383. - M. F. Hasler, Jan 14 2020
-
Python
from sympy import nextprime i=p=1 while i<=500: p = nextprime(p) if '1' not in str(p): print(str(i)+" "+str(p)) i+=1 # Indranil Ghosh, Feb 07 2017, edited by M. F. Hasler, Jan 15 2020 # See the OEIS Wiki page for more efficient programs. - M. F. Hasler, Jan 14 2020
Formula
a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023
Comments