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-10 of 21 results. Next

A119291 Total number of zero digits in first 10^n primes.

Original entry on oeis.org

0, 9, 191, 3303, 46188, 557005, 6481183, 76292782, 881025347, 9763247930, 106864564286, 1162019145892
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Comments

Count the zero digits in the first 10^n primes.

Examples

			a(2)=9 since there are 9 zero digits in the first 100 primes.
		

Crossrefs

Programs

  • Maple
    A055641 := proc(n) local a,d ; a := 0 ; for d in convert(n,base,10) do if d = 0 then a := a+1 ; fi ; od: a ; end: p := 2: n := 1: c :=0 : nsw := 10 : while true do n := n+1 ; p := nextprime(p) ; c := c+A055641(p) ; if n = nsw then print(c) ; nsw := 10*nsw ; fi ; od: # R. J. Mathar, May 30 2008
  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[10^n]]], 0, 2], {n, 6}] (* Robert Price, May 02 2019 *)
  • PARI
    my(x=10, i=0, j=0); forprime(p=1, , j++; my(d=digits(p)); i+=#setintersect(vecsort(d), vector(#d, t, 0)); if(j==x, print1(i, ", "); x=10*x)) \\ Felix Fröhlich, May 02 2019

Formula

a(n) = Sum_{j=1..10^n} A055641(A000040(j)). - R. J. Mathar, May 30 2008

Extensions

a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019

A119300 Total number of 9's digits in the first 10^n primes.

Original entry on oeis.org

2, 33, 431, 6318, 72062, 806674, 9004550, 104220797, 1131743629, 12266783460, 131900123107, 1447662128808
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

			At a(3)=431 there are 431 9's digits in the first 10^3 = 1000 primes.
		

Crossrefs

Programs

  • Maple
    A119300 := proc(n) option remember: local k,s,lim: if(n=0)then return 0:fi: lim:=10^n: s:=procname(n-1): for k from 10^(n-1)+1 to lim do s:=s+nops([SearchAll("9",convert(ithprime(k),string))]): od: return s: end: seq(A119300(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    cnt=0; k=0; Table[While[k++; cnt=cnt+DigitCount[Prime[k], 10, 9];k < 10^n]; cnt, {n, 5}] (* T. D. Noe, May 10 2011 *)

Extensions

a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019

A097952 Sum of the number of digits in the prime numbers less than 10^n.

Original entry on oeis.org

0, 4, 46, 475, 4719, 46534, 459970, 4562537, 45337545, 451112256, 4493162026, 44786187348, 446664473808, 4456613596481, 44480880591963, 444075310669968, 4434375640450064, 44287795522995300, 442382943864554586
Offset: 0

Views

Author

Cino Hilliard, Sep 05 2004

Keywords

Comments

Partial sums of A046719(n) = n*A006879(n). In other words, a(n) is the number of digits used in writing out all {A006880(n)} primes below 10^n. - Lekraj Beedassy, Dec 13 2007

Examples

			There are 25 primes < 100; 4 of them are 1-digit numbers and 21 are 2-digit numbers. Thus a(2) = 4 + 21*2 = 46.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[n(PrimePi[10^n]-PrimePi[10^(n-1)]),{n,0,14}]] (* This generates the first 15 terms of the sequence, but if n exceeds 14 the function PrimePi in Mathematica cannot calculate it. *) (* Harvey P. Dale, Jun 13 2014 *)
  • PARI
    g(n) = for(j=0,n,s=0;forprime(x=2,10^j,y=length(Str(x));s+=y);print1(s","))

Formula

a(n) = Sum_{k=0..n} k * A006879(k). - Amiram Eldar, Jul 04 2024

Extensions

More terms derived from A006879 by R. J. Mathar, Oct 14 2010

A231590 Total number of 1's digits in primes less than 10^n.

Original entry on oeis.org

0, 9, 78, 681, 6353, 59634, 570157, 5510645, 53680317, 525651276, 5166809159, 50931212973, 503152799893, 4979293536415
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=9, since there are 9 1's in primes less than 100. Namely: 11, 13, 17, 19, 31, 41, 61, 71.  Note that 11 counts for two.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[PrimePi[10^n - 1]]]], 1, 2], {n, 7}] (* Robert Price, Jun 16 2019 *)

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231598 Total number of 9's digits in primes less than 10^n.

Original entry on oeis.org

0, 6, 67, 646, 6130, 58145, 558956, 5432190, 53071838, 520787464, 5127052380, 50599825547, 500350977737, 4955299345646
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=6, since there are 6 9's in primes less than 100. Namely: 19, 29, 59, 79, 89, 97.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[PrimePi[10^n - 1]]]], 9, 2], {n, 7}] (* Robert Price, Jun 16 2019 *)

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231411 Total number of zero digits in primes less than 10^n.

Original entry on oeis.org

0, 0, 15, 232, 2725, 30350, 324133, 3386986, 34984325, 358604948, 3657365837, 37164550469, 376613845818, 3808514755978
Offset: 1

Views

Author

Robert Price, Nov 08 2013

Keywords

Examples

			a(3)=15, since there are 15 zeros in primes less than 1000.  Namely: 101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[PrimePi[10^n-1]]]], 0, 2], {n, 7}] (* Robert Price, Jun 16 2019 *)

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A119292 Total number of 1's digits in the first 10^n primes.

Original entry on oeis.org

5, 55, 574, 7043, 102370, 1222003, 13896979, 152844768, 1611113572, 16626301609, 171878734261, 1781706224877
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

			At a(1)=5 there are 5 1's digits in the first 10^1 primes.
		

Crossrefs

Programs

  • Maple
    A119292 := proc(n) option remember: local k,s,lim: if(n=0)then return 0:fi: lim:=10^n: s:=procname(n-1): for k from 10^(n-1)+1 to lim do s:=s+nops([SearchAll("1",convert(ithprime(k),string))]): od: return s: end: seq(A119292(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[10^n]]], 1, 2], {n, 6}] (* Robert Price, May 02 2019 *)
  • PARI
    my(x=10, i=0, j=0); forprime(p=1, , j++; my(d=digits(p)); i+=#setintersect(vecsort(d), vector(#d, t, 1)); if(j==x, print1(i, ", "); x=10*x)) \\ Felix Fröhlich, May 02 2019

Extensions

Offset changed from 0 to 1 by Nathaniel Johnston, May 09 2011
a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019

A119293 Total number of 2's digits in the first 10^n primes.

Original entry on oeis.org

3, 26, 339, 4070, 55213, 632418, 7133747, 82051293, 1041785731, 12182327373, 137771632675, 1525041000685
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Comments

Count the 2's digits in 10^n primes.

Examples

			At a(1)=3 there are 3 2's digits in the first 10^1 primes.
		

Crossrefs

Programs

  • Maple
    A119293 := proc(n) option remember: local k,s,lim: if(n=0)then return 1:fi: lim:=10^n: s:=procname(n-1): for k from 10^(n-1)+1 to lim do s:=s+nops([SearchAll("2",convert(ithprime(k),string))]): od: return s: end: seq(A119293(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[10^n]]], 2, 2], {n, 6}] (* Robert Price, May 02 2019 *)

Extensions

Offset changed from 0 to 1 by Nathaniel Johnston, May 09 2011
a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019

A119294 Total number of 3's digits in the first 10^n primes.

Original entry on oeis.org

3, 54, 569, 6500, 72717, 880415, 9616078, 105052677, 1139295891, 12676601300, 135996846047, 1450287630358
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

			At a(1)=3 there are 3 3's digits in the first 10^1 primes.
		

Crossrefs

Programs

  • Maple
    A119294 := proc(n) option remember: local k,s,lim: if(n=0)then return 0:fi: lim:=10^n: s:=procname(n-1): for k from 10^(n-1)+1 to lim do s:=s+nops([SearchAll("3",convert(ithprime(k),string))]): od: return s: end: seq(A119294(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Accumulate@Table[Count[IntegerDigits[Prime[Range[10^(n - 1) + 1, 10^n]]], 3, 2], {n, 6}] (* Robert Price, Jun 16 2019 *)

Extensions

Offset changed from 0 to 1 by Nathaniel Johnston, May 09 2011
a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019

A119295 Total number of 4's digits in the first 10^n primes.

Original entry on oeis.org

0, 27, 311, 3919, 47647, 628061, 7098709, 79587350, 888504625, 10169426048, 110936566287, 1199775766812
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

			At a(2)=27 there are 27 4's digits in the first 10^2 primes.
		

Crossrefs

Programs

  • Maple
    A119295 := proc(n) option remember: local k,s,lim: if(n=0)then return 0:fi: lim:=10^n: s:=procname(n-1): for k from 10^(n-1)+1 to lim do s:=s+nops([SearchAll("4",convert(ithprime(k),string))]): od: return s: end: seq(A119295(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Accumulate@Table[c = 0; For[i = 10^(n - 1) + 1, i <= 10^n, i++, c += Count[IntegerDigits[Prime[i]], 4]]; c, {n, 6}] (* Robert Price, Jun 09 2019 *)

Extensions

Offset changed from 0 to 1 by Nathaniel Johnston, May 09 2011
a(8)-a(11) from Robert Price, Nov 05 2013
a(12) from Marek Hubal, Mar 04 2019
Showing 1-10 of 21 results. Next