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-6 of 6 results.

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

A156756 Primes not containing exactly two odd digits.

Original entry on oeis.org

2, 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

Juri-Stepan Gerasimov, Feb 15 2009

Keywords

Comments

Odd digits are 1, 3, 5, 7 or 9.

Crossrefs

Programs

  • Mathematica
    checkQ[n_] := Module[{d = IntegerDigits[n]}, Length[Select[d, OddQ]] != 2]; Select[Prime[Range[200]], checkQ] (* T. D. Noe, Jun 06 2012 *)
  • PARI
    is(n)=#select(d->d%2,digits(n))!=2 && isprime(n) \\ Charles R Greathouse IV, Apr 08 2016

Formula

a(n) ~ n log n. On the Riemann hypothesis, a(n) = ali(n) + O(n^k log n) where ali is the inverse logarithmic integral and k = log 5/log 10 = 0.69897.... - Charles R Greathouse IV, Apr 08 2016

Extensions

183 replaced by 283 - R. J. Mathar, Feb 20 2009
Definition clarified by Jonathan Sondow, Jun 06 2012

A155071 Primes with two odd digits.

Original entry on oeis.org

11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 101, 103, 107, 109, 127, 149, 163, 167, 181, 211, 233, 239, 251, 257, 271, 277, 293, 307, 347, 349, 367, 383, 389, 419, 431, 433, 439, 457, 479, 491, 499, 503, 509, 521, 523, 541, 547, 563, 569, 587, 613, 617
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 19 2009

Keywords

Crossrefs

Cf. A104638.

Programs

Extensions

Definition clarified, keyword:fini removed, 413 replaced by 419 - R. J. Mathar, May 05 2010
Erroneous comment deleted by Harvey P. Dale, Jul 22 2025

A104637 Number of even digits in n-th prime.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Zak Seidov, Mar 18 2005

Keywords

Crossrefs

Number of odd digits in n-th prime gives A104638.

Formula

a(n) = A196563(A000040(n)). - Michel Marcus, Oct 05 2013

A155498 Number of odd digits in the concatenation of first n primes.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 11, 12, 13, 15, 17, 18, 19, 20, 22, 24, 25, 26, 28, 30, 32, 33, 34, 36, 38, 40, 42, 44, 47, 49, 52, 55, 58, 60, 63, 66, 68, 70, 73, 76, 78, 81, 84, 87, 90, 92, 93, 94, 95, 97, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 116, 119, 122, 125, 128
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 23 2009

Keywords

Comments

Partial sums of A104638. [R. J. Mathar, Feb 13 2009]

Examples

			If n=1, concatenate first 1 prime = 2, then number of odd digits = 0 = a(1).
If n=2, concatenate first 2 primes = 23, then number of odd digits = 1 = a(2).
If n=3, concatenate first 3 primes = 235, then number of odd digits = 2 = a(3).
		

Crossrefs

Programs

Extensions

Replaced 53 by 55. R. J. Mathar, Feb 13 2009

A156607 a(n) = number of odd decimal digits of n-th prime + number of prime decimal digits of n-th prime.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 3, 2, 3, 2, 3, 4, 1, 2, 2, 4, 3, 1, 2, 3, 4, 3, 2, 1, 3, 2, 3, 3, 2, 4, 4, 4, 5, 4, 2, 4, 5, 3, 3, 5, 4, 2, 3, 4, 4, 3, 3, 4, 4, 3, 5, 4, 2, 4, 5, 3, 2, 4, 5, 2, 3, 4, 4, 4, 5, 5, 5, 6, 4, 3, 6, 5, 4, 6, 5, 4, 3, 5, 1, 1, 2, 2, 3, 4, 3, 2, 1, 4, 1, 2, 2, 3, 2, 2, 2, 4, 3, 4, 5, 3, 4, 6, 4, 3, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 11 2009

Keywords

Comments

Odd digits are 1, 3, 5, 7 and 9. Prime digits are 2, 3, 5 and 7.

Examples

			prime(1)= 2 (0 odd digits, 1 prime), so a(1) = 0 + 1 = 1;
prime(2)= 3 (1 odd digit,  1 prime), so a(2) = 1 + 1 = 2;
prime(3)= 5 (1 odd digit,  1 prime), so a(3) = 1 + 1 = 2;
prime(4)= 7 (1 odd digit,  1 prime), so a(4) = 1 + 1 = 2;
prime(5)=11 (2 odd digits, 0 prime), so a(5) = 2 + 0 = 2;
prime(6)=13 (2 odd digits, 1 prime), so a(6) = 2 + 1 = 3.
		

Crossrefs

Programs

  • Maple
    numPdgs := proc(n) local f,d ; f := 0 ; for d in convert(n,base,10) do if d in {2,3,5,7} then f :=f+1; end if; end do; f ; end proc:
    numOdddgs := proc(n) local f,d ; f := 0 ; for d in convert(n,base,10) do if type(d,'odd') then f :=f+1; end if; end do; f ; end proc:
    A156607 := proc(n) p := ithprime(n) ; numPdgs(p) + numOdddgs(p) ; end proc:
    seq(A156607(n),n=1..120) ; # R. J. Mathar, May 15 2010
  • Mathematica
    d[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,?OddQ]+Count[ idn, ?PrimeQ]]; d/@Prime[Range[150]] (* Harvey P. Dale, May 16 2014 *)

Extensions

a(54) corrected by R. J. Mathar, May 15 2010
Example section edited by Jon E. Schoenfield, Feb 14 2019
Showing 1-6 of 6 results.