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.

A046719 Total number of digits in all primes with n digits.

Original entry on oeis.org

4, 42, 429, 4244, 41815, 413436, 4102567, 40775008, 405774711, 4042049770, 40293025322, 401878286460, 4009949122673, 40024266995482, 399594430078005, 3990300329780096, 39853419882545236, 398095148341559286, 3977036546783471193
Offset: 1

Views

Author

Keywords

Examples

			There are 21 2-digit primes, so a(2)=2*21=42.
		

Crossrefs

a(n)=n*b(n) where b(n) is A006879.

Programs

  • Mathematica
    Flatten[Table[n*Differences[PrimePi[{10^(n - 1), 10^n}]], {n, 13}]] (* Jayanta Basu, Jun 27 2013 *)
    With[{nn=14},Differences[PrimePi[10^Range[0,nn]]]*Range[nn]] (* This program generates only the first 14 terms of the sequence; Mathematica's PrimePi function cannot generate the 15th or higher terms *) (* Harvey P. Dale, Apr 22 2016 *)

Extensions

Corrected by Jud McCranie and N. J. A. Sloane.