cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 56 results. Next

A038617 Primes not containing the digit '9'.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 41, 43, 47, 53, 61, 67, 71, 73, 83, 101, 103, 107, 113, 127, 131, 137, 151, 157, 163, 167, 173, 181, 211, 223, 227, 233, 241, 251, 257, 263, 271, 277, 281, 283, 307, 311, 313, 317, 331, 337, 347, 353, 367, 373, 383, 401, 421
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A007095. - Michel Marcus, Feb 22 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Intersection of A000040 (primes) and A007095 (numbers with no digit 9).
Primes having no digit d = 0..9 are A038618, A038603, A038604, A038611, A038612, A038613, A038614, A038615, A038616, and this sequence, respectively.
Primes with other restrictions on digits: A106116, A156756.

Programs

  • Magma
    [ p: p in PrimesUpTo(500) | not 9 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[1000]], DigitCount[ # ][[9]] == 0 &] (* Stefan Steinerberger, May 20 2006 *)
  • PARI
    lista(nn)=forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), 9), print1(p, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    lista(nn) = forprime (p=2, nn, if (vecmax(digits(p)) != 9, print1(p, ", "))); \\ Michel Marcus, Apr 06 2016
    
  • PARI
    next_A038617(n)=until((n=nextprime(n+1))==(n=next_A007095(n-1)), ); n \\ M. F. Hasler, Jan 14 2020
    
  • Python
    from sympy import isprime
    i = 1
    while i <= 300:
        if "9" not in str(i) and isprime(i):
            print(str(i), end=",")
        i += 1 # Indranil Ghosh, Feb 07 2017

Formula

a(n) ~ n^(log 10/log 9) * log(n). - Charles R Greathouse IV, Aug 03 2023

A038604 Primes not containing the digit '2'.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A052404. - Michel Marcus, Feb 21 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Subsequence of A065091 (odd primes).
Primes having no digit d = 0..9 are A038618, A038603, this sequence, A038611, A038612, A038613, A038614, A038615, A038616, and A038617, respectively.

Programs

  • Magma
    [ p: p in PrimesUpTo(400) | not 2 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 2] == 0 &] (* Vincenzo Librandi, Aug 08 2011 *)
  • PARI
    lista(nn, d=2) = {forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), d), print1(p, ", ")););} \\ Michel Marcus, Feb 21 2015
    
  • PARI
    select( {is_A038604(n)=is_A052404(n)&&isprime(n)}, [1..400]) \\ see Wiki for more
    {next_A038604(n)=until((n==nextprime(n+1))==n=next_A052404(n-1),);n} \\ M. F. Hasler, Jan 12 2020
    
  • Python
    from sympy import isprime, nextprime
    def is_A038604(n): return str(n).find('2')<0 and isprime(n)
    def next_A038604(n): # get smallest term > n
        while True:
            n = nextprime(n); s = str(n); t = s.find('2')
            if t < 0: return n
            t = 10**(len(s)-1-t); n += t - n%t
    def A038604_upto(stop=math.inf, start=3):
        while start < stop: yield start; start = next_A038604(start)
    list(A038604_upto(400))
    # M. F. Hasler, Jan 12 2020

Formula

Intersection of A000040 and A052404. - M. F. Hasler, Jan 11 2020
a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 07 2011

A038612 Primes not containing the digit '4'.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A052406. - Michel Marcus, Feb 22 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Intersection of A000040 (primes) and A052406 (numbers without digit 4).
Primes having no digit d = 0..9 are A038618, A038603, A038604, A038611, this sequence, A038613, A038614, A038615, A038616, and A038617, respectively.

Programs

  • Magma
    [ p: p in PrimesUpTo(300) | not 4 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 4] == 0 &] (* Vincenzo Librandi, Aug 08 2011 *)
  • PARI
    lista(nn)=forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), 4), print1(p, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    ( {A038612_upto(N)=select( is_A052406, primes([1, N]))} )(444) \\ or better:
    next_A038612(n)={until(isprime(n), n=next_A052406(nextprime(n+1)-1)); n}
    ( {A038612_vec(n,M=1)=M--;vector(n,i, n=next_A038612(if(i>1, n)))} )(20, 1000)
    \\ (See the OEIS wiki page for more.) - M. F. Hasler, Jan 12 2020

Formula

a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 07 2011

A038614 Primes not containing the digit '6'.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 271, 277, 281, 283, 293, 307, 311
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A052414. - Michel Marcus, Feb 22 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Intersection of A000040 (primes) and A052414 (numbers with no digit 6).
Primes having no digit d = 0..9 are A038618, A038603, A038604, A038611, A038612, A038613, this sequence, A038615, A038616, and A038617, respectively.

Programs

  • Magma
    [ p: p in PrimesUpTo(400) | not 6 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Maple
    no6:= proc(n) option remember;
      n mod 10 <> 6 and procname(floor(n/10))
    end proc:
    no6(0):= true:
    select(no6 and isprime, [2,seq(i,i=3..1000,2)]); # Robert Israel, Mar 16 2017
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 6] == 0 &] (* Vincenzo Librandi, Aug 08 2011 *)
  • PARI
    lista(nn)=forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), 6), print1(p, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    select( {is_A038614(n)=is_A052414(n)&&isprime(n)}, [1..350]) \\ see A052414
    (A038614_upto(n)=select( is_A038614, primes([1,n])))(350) \\ needs the above
    next_A038614(n)={until(isprime(n), n=next_A052414(nextprime(n+1)-1));n}
    (A038614_vec(n)=vector(n,i,n=next_A038614(if(i>1,n))))(66) \\ M. F. Hasler, Jan 12 2020

Formula

Intersection of A000040 and A052414. - M. F. Hasler, Jan 12 2020
a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 07 2011

A038613 Primes not containing the digit '5'.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 263, 269, 271, 277, 281, 283, 293, 307, 311
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A052413. - Michel Marcus, Feb 22 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Examples

			From _M. F. Hasler_, Jan 14 2020: (Start)
After a(85) = 499, the next prime without digit 5 is a(86) = 601.
After a(3734) = 49999, the next term is a(3735) = 60013.
After a(27273) = 499979, the next term is 600011.
After a(206276) = 4999999, the next term is 6000011. (End)
		

Crossrefs

Intersection of A000040 (primes) and A052413 (numbers with no digit 5).
Primes having no digit d = 0..9 are A038618, A038603, A038604, A038611, A038612, this sequence, A038614, A038615, A038616, and A038617, respectively.

Programs

  • Magma
    [ p: p in PrimesUpTo(400) | not 5 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 5] == 0 &] (* Vincenzo Librandi, Aug 08 2011 *)
  • PARI
    lista(nn)=forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), 5), print1(p, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    (A038613_upto(n)=select( is_A052413, primes([1, n])))(350) \\ see A052413
    next_A038613(n)={until(isprime(n), n=next_A052413(nextprime(n+1)-1)); n}
    ( {A038613_vec(n, M=1)=M--;vector(n, i, M=next_A038613(M))} )(20, 1000) \\ Compute n terms >= M. See also the OEIS wiki page. - M. F. Hasler, Jan 14 2020

Formula

a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 07 2011

A038616 Primes not containing the digit '8'.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 293, 307
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Subsequence of primes of A052421. - Michel Marcus, Feb 22 2015
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Intersection of A000040 (primes) and A052421 (numbers with no 8).
Primes having no digit d = 0..9 are A038618, A038603, A038604, A038611, A038612, A038613, A038614, A038615, this sequence, and A038617, respectively.

Programs

  • Magma
    [ p: p in PrimesUpTo(400) | not 8 in Intseq(p) ]; // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 8] == 0 &] (* Harvey P. Dale, Jan 24 2011 *)
  • PARI
    lista(nn)=forprime(p=2, nn, if (!vecsearch(vecsort(digits(p),,8), 8), print1(p, ", "));); \\ Michel Marcus, Feb 22 2015
    
  • PARI
    next_A038616(n)=until((n=nextprime(n+1))==(n=next_A052421(n-1)), ); n \\ M. F. Hasler, Jan 14 2020

Formula

a(n) ~ n^(log 10/log 9) * log(n). - Charles R Greathouse IV, Aug 03 2023

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 07 2011

A056709 Naught-y primes, primes with noughts (or zeros).

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1201, 1301, 1303, 1307, 1409, 1601, 1607, 1609, 1709, 1801, 1901, 1907
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Intersection of A000040 and A011540. - Michel Marcus, Mar 12 2015

Crossrefs

Cf. A000040 (primes), A011540 (numbers that contain a 0).
Complement, in A000040, of zeroless primes A038618.
Cf. A164968 (Naughty primes: most digits are 0).

Programs

  • Magma
    [p:p in PrimesUpTo(2000)|0 in Intseq(p)]; // Marius A. Burtea, Jan 13 2020
    
  • Mathematica
    Select[ Range[ 1, 2500, 2 ], PrimeQ[ # ] && Sort[ RealDigits[ # ][ [ 1 ] ] ][ [ 1 ] ] == 0 & ]
    (* Second program: *)
    Select[Prime@ Range@ 300, DigitCount[#, 10, 0] > 0 &] (* Michael De Vlieger, Jan 28 2020 *)
  • PARI
    is(n)=isprime(n)&&vecsort(eval(Vec(Str(n))),,8)[1]==0
    
  • PARI
    select( {is_A056709(n)=!vecmin(digits(n))&&isprime(n)}, [1..2000]) \\ Defines the characteristic function is_A; as check & example: select terms in [1..2000].
    next_A056709(n)={until(!vecmin(digits(n)), n=nextprime(n+1));n} \\ Successor function: find smallest a(k) > n. Useful to get a vector of consecutive terms:
    A056709_vec(n,M=99)=M--;vector(n,i,M=next_A056709(M)) \\ get n terms >= M (if given, else start with a(1)).  \\ M. F. Hasler, Jan 12 2020
    
  • Python
    from sympy import primerange
    def aupto(lim): return [p for p in primerange(1, lim+1) if '0' in str(p)]
    print(aupto(1910)) # Michael S. Branicky, Mar 11 2022

Formula

a(n) ~ n log n: almost all primes are in this sequence. - Charles R Greathouse IV, Jul 24 2012

A034302 Zeroless primes that remain prime if any digit is deleted.

Original entry on oeis.org

23, 37, 53, 73, 113, 131, 137, 173, 179, 197, 311, 317, 431, 617, 719, 1499, 1997, 2239, 2293, 3137, 4919, 6173, 7433, 9677, 19973, 23833, 26833, 47933, 73331, 74177, 91733, 93491, 94397, 111731, 166931, 333911, 355933, 477797, 477977
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (inits, tails)
    a034302 n = a034302_list !! (n-1)
    a034302_list = filter f $ drop 4 a038618_list where
       f x = all (== 1) $ map (a010051 . read) $
                 zipWith (++) (inits $ show x) (tail $ tails $ show x)
    -- Reinhard Zumkeller, Dec 17 2011
    
  • Mathematica
    rpnzQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,0]==0 && And@@ PrimeQ[FromDigits/@ Subsets[IntegerDigits[n], {Length[idn]-1}]]]; Select[Prime[Range[40000]],rpnzQ]  (* Harvey P. Dale, Mar 24 2011 *)
  • PARI
    is(n)=my(d=digits(n),t=2^#d-1); if(vecmin(d)==0, return(0)); for(i=0,#d-1, if(!isprime(fromdigits(vecextract(d,t-2^i))), return(0))); isprime(n) \\ Charles R Greathouse IV, Jun 23 2017
    
  • Python
    from itertools import product
    from sympy import isprime
    A034302_list, m = [23, 37, 53, 73], 7
    for l in range(1,m-1): # generate all terms less than 10^m
        for d in product('123456789',repeat=l):
            for e in product('1379',repeat=2):
                s = ''.join(d+e)
                if isprime(int(s)):
                    for i in range(len(s)):
                        if not isprime(int(s[:i]+s[i+1:])):
                            break
                    else:
                        A034302_list.append(int(s)) # Chai Wah Wu, Apr 05 2021

A178550 Primes with exactly one digit 1.

Original entry on oeis.org

13, 17, 19, 31, 41, 61, 71, 103, 107, 109, 127, 137, 139, 149, 157, 163, 167, 173, 179, 193, 197, 199, 241, 251, 271, 281, 313, 317, 331, 401, 419, 421, 431, 461, 491, 521, 541, 571, 601, 613, 617, 619, 631, 641, 661, 691, 701, 719, 751, 761, 821, 881, 919, 941, 971, 991
Offset: 1

Views

Author

Lekraj Beedassy, May 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200]],Count[IntegerDigits[#],1]==1 &] (* Stefano Spezia, Aug 29 2025 *)
  • Python
    from sympy import isprime
    print([i for i in range(1000) if str(i).count('1') == 1 and isprime(i)]) # Daniel Starodubtsev, Mar 29 2020

Formula

a(n) >> n^k where k = log(10)/log(9) = 1.04795.... - Charles R Greathouse IV, Jan 21 2025

A069488 Primes > 100 in which every substring of length 2 is also prime.

Original entry on oeis.org

113, 131, 137, 173, 179, 197, 311, 313, 317, 373, 379, 419, 431, 479, 613, 617, 619, 673, 719, 797, 971, 1117, 1171, 1319, 1373, 1973, 1979, 2311, 2371, 2971, 3119, 3137, 3719, 3797, 4111, 4373, 6113, 6131, 6173, 6197, 6719, 6737
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

Minimum number of digits is taken to be 3 as all two-digit primes would be trivial members.
From Robert G. Wilson v, May 12 2014: (Start)
The number of terms below 10^n: 0, 0, 21, 46, 123, 329, 810, 1733, 3985, 9710, ..., .
The least term with n digits is: 113, 1117, 11113, 111119, ..., see A090534.
The largest term with n digits is: 971, 9719, 97973, 979717, ..., see A242377.
The digits 2, 4, 5, 6 and 8 can only appear at the beginning of the prime and the digit 0 never appears. But the digits 1, 3, 7 and 9 can appear anywhere, yet only 1,1 can appear as a pair.
\10^n
d\ 1&2 3 4 5 6 7 8 9 10 Total % @ 10^10
\
1 0 19 34 146 648 1162 2678 8037 22740 39.188034
2 0 0 3 6 27 18 66 175 449 0.816186
3 0 14 19 63 326 712 1526 3855 11040 19.403018
4 0 3 2 13 54 92 143 384 1031 1.895550
5 0 0 0 9 17 24 45 176 426 0.763995
6 0 4 6 4 24 66 146 233 630 1.224834
7 0 14 20 100 436 907 1980 5442 15421 26.875285
8 0 0 3 6 24 25 37 176 388 0.721797
9 0 9 13 38 157 361 763 1790 5125 9.111301
Total 0 63 100 385 1713 3367 7384 20268 57250 100.00000
(End)

Examples

			3719 is a term as the three substrings of length 2, i.e., 37, 71 and 19, are all prime.
		

Crossrefs

Cf. A069489 and A069490.
Cf. A010051, subsequence of zeroless primes: A038618.

Programs

  • Haskell
    a069488 n = a069488_list !! (n-1)
    a069488_list = filter f $ dropWhile (<= 100) a038618_list where
       f x = x < 10 || a010051 (x `mod` 100) == 1 && f (x `div` 10)
    -- Reinhard Zumkeller, Apr 07 2014
  • Mathematica
    Do[ If[ Union[ PrimeQ[ Map[ FromDigits, Partition[ IntegerDigits[ Prime[n]], 2, 1]]]] == {True}, Print[ Prime[n]]], {n, PrimePi[100] + 1, 500}]

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 12 2002
Previous Showing 11-20 of 56 results. Next