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.

Previous Showing 11-20 of 20 results.

A119297 Total number of 6's digits in the first 10^n primes.

Original entry on oeis.org

0, 10, 315, 3824, 47269, 560677, 7079879, 79433407, 887292243, 9778050835, 110518283071, 1198946387631
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    A119297 := 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("6",convert(ithprime(k),string))]): od: return s: end: seq(A119297(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[10^n]]], 6, 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

A119298 Total number of 7's digits in the first 10^n primes.

Original entry on oeis.org

2, 34, 551, 6338, 72319, 809360, 9543704, 104376285, 1136782466, 12273965395, 134080968533, 1448607569210
Offset: 1

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    A119298 := 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("7",convert(ithprime(k),string))]): od: return s: end: seq(A119298(n),n=1..4); # Nathaniel Johnston, May 09 2011
  • Mathematica
    Table[Count[IntegerDigits[Prime[Range[10^n]]], 7, 2], {n, 6}] (* Robert Price, May 02 2019 *)
    Table[Total[Table[DigitCount[p,10,7],{p,Prime[Range[10^n]]}]],{n,7}] (* The program generates the first seven terms of the sequence. *) (* Harvey P. Dale, Dec 10 2024 *)

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

A268839 a(n) = Sum_{j=1..10^n-1} 2^f(j) where f(j) is the number of zero digits in the decimal representation of j.

Original entry on oeis.org

9, 108, 1197, 13176, 144945, 1594404, 17538453, 192922992, 2122152921, 23343682140, 256780503549, 2824585539048, 31070440929537, 341774850224916, 3759523352474085, 41354756877214944, 454902325649364393, 5003925582143008332, 55043181403573091661
Offset: 1

Views

Author

Michel Lagneau, Feb 14 2016

Keywords

Comments

We calculate the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation. To form a such number consisting of m digits (k < m), place k zeros in m-1 possible positions, then we must choose m-k digits different from zero. Thus, the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation is: Sum_{m=k+1..n} binomial(m-1, k)*9^(m-k).
Hence the sum: Sum_{m=1..n} Sum_{k=0..m-1} binomial(m-1,k)*9^(m-k)*2^k = Sum_{m=1..n} 9^m*(11/9)*(m-1) = (9/10)*(11^n - 1).

Examples

			a(1) = 9 because 2^f(1) + 2^f(2) + ... + 2^f(9) = 2^0 + 2^0 + ... + 2^0 = 9;
a(2) = 108 because 2^f(1) + 2^f(2) + ... + 2^f(99) = 9*10 + 2*9 = 108, where f(10) = f(20) = ... = f(90) = 1 and f(i) = 0 otherwise.
		

Crossrefs

Programs

  • Magma
    [(9/10)*(11^n-1): n in [1..20]]; // Vincenzo Librandi, Feb 15 2016
    
  • Maple
    for n from 1 to 100 do: x:=(9/10)*(11^n-1):printf(‘%d, ‘,x):od:
  • Mathematica
    Table[Table[(9/10) (11^n - 1), {n, 1, 20}]] (* Bruno Berselli, Feb 15 2016 *)
    CoefficientList[Series[9/((1 - 11 x) (1 - x)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 15 2016 *)
  • PARI
    Vec(9*x/((1-11*x)*(1-x)) + O(x^30)) \\ Colin Barker, Feb 22 2016

Formula

a(n) = (9/10)*(11^n-1) = 9*A016123(n-1).
From Vincenzo Librandi, Feb 15 2016: (Start)
G.f.: (9*x)/((1-11*x)*(1-x)).
a(n) = 11*a(n-1) + 9. (End)
E.g.f.: 9*exp(x)*(exp(10*x) - 1)/10. - Stefano Spezia, Sep 13 2023

Extensions

Name edited by Jon E. Schoenfield, Sep 13 2017

A231591 Total number of 2's digits in primes less than 10^n.

Original entry on oeis.org

1, 3, 32, 391, 3906, 39572, 400626, 4047829, 40794211, 410514052, 4126066282, 41436122092, 415853103290, 4171375888398
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=3, since there are 3 2's in primes less than 100. Namely: 2, 23, 29.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231592 Total number of 3's digits in primes less than 10^n.

Original entry on oeis.org

1, 9, 75, 677, 6229, 58770, 564650, 5472472, 53396224, 523382007, 5148387363, 50778098799, 501864775685, 4968288427006
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=9, since there are 9 3's in primes less than 100. Namely: 3, 13, 23, 31, 37, 43, 53, 73, 83.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231593 Total number of 4's digits in primes less than 10^n.

Original entry on oeis.org

0, 3, 34, 360, 3772, 39006, 397474, 4022501, 40604951, 408986159, 4113511677, 41331763006, 414971464358, 4163826451096
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=3, since there are 3 4's in primes less than 100. Namely: 41, 43, 47.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231594 Total number of 5's digits in primes less than 10^n.

Original entry on oeis.org

1, 3, 33, 360, 3816, 38911, 396016, 4015732, 40543671, 408462140, 4109293287, 41296082801, 414669334188, 4161237526152
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=3, since there are 3 5's in primes less than 100. Namely: 5, 53, 59.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231595 Total number of 6's digits in primes less than 10^n.

Original entry on oeis.org

0, 2, 33, 369, 3741, 38714, 395621, 4007705, 40484195, 408035120, 4105718243, 41266320918, 414416274953, 4159068898063
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=2, since there are 2 6's in primes less than 100. Namely: 61, 67.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231596 Total number of 7's digits in primes less than 10^n.

Original entry on oeis.org

1, 9, 78, 652, 6172, 58327, 560506, 5443074, 53152746, 521422184, 5132090751, 50642752951, 500714890907, 4958432528817
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=9, since there are 9 7's in primes less than 100. Namely: 7, 17, 37, 47, 67, 71, 73, 79, 97.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015

A231597 Total number of 8's digits in primes less than 10^n.

Original entry on oeis.org

0, 2, 30, 351, 3690, 38541, 394398, 3998411, 40399778, 407316676, 4099892369, 41217744252, 414006129652, 4155543234392
Offset: 1

Views

Author

Robert Price, Nov 11 2013

Keywords

Examples

			a(2)=2, since there are 2 8's in primes less than 100. Namely: 83, 89.
		

Crossrefs

Programs

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

Extensions

a(14) from Giovanni Resta, Jul 20 2015
Previous Showing 11-20 of 20 results.