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.

A121242 Number of 2's in first n primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24
Offset: 1

Views

Author

Zak Seidov, Aug 22 2006

Keywords

Comments

In the first 10^m (m=3,4,5) primes there are 339, 4070, 55213 2's, among all 3803, 48982, 610484 digits, which gives the frequencies {0.08914, 0.08309, 0.09044}.

Crossrefs

Cf. A068670 Number of digits in the first n primes.
Partial sums of A085976.

Programs

  • Maple
    ListTools:-PartialSums([seq(numboccur(2,convert(ithprime(i),base,10)),i=1..100)]); # Robert Israel, Jun 13 2018
  • Mathematica
    Accumulate[DigitCount[Prime[Range[90]],10,2]] (* Harvey P. Dale, Nov 09 2013 *)