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.

Showing 1-4 of 4 results.

A038603 Primes not containing the digit '1'.

Original entry on oeis.org

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

Views

Author

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

Keywords

Comments

Subsequence of A132080. - Reinhard Zumkeller, Aug 09 2007
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 A052383 (numbers with no digit 1).
Primes having no digit d = 0..9 are A038618, this sequence, A038604, A038611, A038612, A038613, A038614, A038615, A038616, and A038617, respectively.
Primes with other restrictions on digits: A106116, A156756.

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

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

A119450 Primes with odd digit sum.

Original entry on oeis.org

3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 113, 131, 137, 139, 151, 157, 173, 179, 191, 193, 197, 199, 223, 227, 229, 241, 263, 269, 281, 283, 311, 313, 317, 331, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 461, 463, 467, 487, 557, 571, 577, 593
Offset: 1

Views

Author

Zak Seidov, May 20 2006

Keywords

Comments

On average, there are as many prime numbers for which the sum of decimal digits is even as prime numbers for which it is odd [A119450]. This hypothesis, first made in 1968, has recently been proved by researchers from the Institut de Mathematiques de Luminy.
Also primes such that absolute value of difference between largest digit and the sum of all the other digits is an odd integer. This is in accordance with hypothesis of Alexandre Gelfond, proved by C. Mauduit and J. Rivat as stated in Links section. - Osama Abuajamieh, Feb 10 2017
Considering the sequence digit sums, when prime, new maximum digit sums encounter the prime numbers themselves in order. This of course implies that, for any largest considered prime Pmax in this sequence, there will exist a larger entry P2 with digit sum = Pmax. Note the data available for such scrutiny grows very slowly - considering primes through 10^12 only attains digit sum to (prime) 97. Additionally, a parallel observation can be drawn about the behavior of companion sequence A119449. Also, this sequence appears to be a subset of A156756. - Bill McEachen, Mar 26 2017

Crossrefs

Primes with even digit sum A119449.

Programs

  • Maple
    select(t -> isprime(t) and convert(convert(t,base,10),`+`)::odd, [seq(i,i=3..1000,2)]); # Robert Israel, Feb 13 2017
  • Mathematica
    Select[Prime@ Range@ 108, OddQ@ Total@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 11 2017 *)
  • PARI
    is(n)=isprime(n) && sumdigits(n)%2 \\ Charles R Greathouse IV, Feb 14 2017

Formula

a(n) = A000040(A200260(n)). - Jon Maiga, Jul 03 2021
{A000040(k) : A104638(k) odd}. - R. J. Mathar, Jul 13 2025

A225659 Primes p where p + sumOfDigits(p) +- 3 is prime.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 131, 137, 139, 157, 173, 179, 191, 197, 223, 227, 229, 241, 263, 269, 283, 311, 313, 317, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 463, 467, 487, 557
Offset: 1

Views

Author

John-Å. W. Olsen, May 11 2013

Keywords

Comments

a(n) = A068690(n), A030144(n), A069556(n), A091727(n), A156756(n) if n<14.

Examples

			If p = 409, then 409 + sod(409) +- 3 = 409+13 - 3 = 419, which is prime.
If p =  23, then  23 + sod(23)  +- 3 = 23+5   + 3 = 31,  which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[102]],Or@@PrimeQ[#+Total[IntegerDigits[#]]+{3,-3}] &] (* Jayanta Basu, May 23 2013 *)
  • PARI
    ok(p)= {my(s=vecsum(digits(p)));isprime(p) && (isprime(p+s-3) || isprime(p+s+3))}
    select(ok,[1..1000]) \\ Andrew Howroyd, Feb 22 2018
Showing 1-4 of 4 results.