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 10 results.

A014950 Numbers m such that m divides 10^m - 1.

Original entry on oeis.org

1, 3, 9, 27, 81, 111, 243, 333, 729, 999, 2187, 2997, 4107, 6561, 8991, 12321, 13203, 19683, 20439, 26973, 36963, 39609, 59049, 61317, 80919, 110889, 118827, 151959, 177147, 183951, 242757, 332667, 356481, 455877, 488511, 531441, 551853, 728271
Offset: 1

Views

Author

Keywords

Comments

Also, m such that m | R(m) = A002275(m). - Lekraj Beedassy, Mar 25 2005
For n > 1, 3 divides a(n). If m is in the sequence and d divides m then for each positive integer k, d^k*m is in the sequence. So if m is in the sequence then m^k is in the sequence for each positive integer k. In particular, 3^k is in this sequence for all k. - Farideh Firoozbakht, Apr 14 2010
Numbers m such that m divides s(m), where s(1) = 1, s(k) = s(k-1) + k*10^(k-1).
Number of terms <= 10^k, beginning with k = 0: 1, 3, 5, 10, 15, 25, 41, 68, 108, 178, 291, ... - Robert G. Wilson v, Nov 30 2013
Numbers m such that m divides A033713(m). - Hans Havermann, Jan 25 2014

References

  • J. D. E. Konhauser et al., Which Way Did The Bicycle Go? Problem 80 pp. 26; 133, Dolciani Math. Exp., No. 18, MAA, Washington DC, 1996.

Crossrefs

Programs

Formula

Solutions to 10^m == 1 (mod m). - Vladeta Jovovic

Extensions

More terms from Vladeta Jovovic, Dec 18 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jan 06 2005
Edited by Max Alekseyev, May 20 2011

A212704 a(n) = 9*n*10^(n-1).

Original entry on oeis.org

9, 180, 2700, 36000, 450000, 5400000, 63000000, 720000000, 8100000000, 90000000000, 990000000000, 10800000000000, 117000000000000, 1260000000000000, 13500000000000000, 144000000000000000, 1530000000000000000, 16200000000000000000, 171000000000000000000, 1800000000000000000000
Offset: 1

Views

Author

Stanislav Sykora, May 25 2012

Keywords

Comments

Main transitions in systems of n particles with spin 9/2.
Please, refer to the general explanation in A212697.
This particular sequence is obtained for base b=10, corresponding to spin S = (b-1)/2 = 9/2.
Number of 0 needed to write all numbers of n+1 digits. - Bruno Berselli, Jun 30 2014
Essentially the same as A113119. - Bernard Schott, Nov 15 2022
From Bernard Schott, Nov 22 2022: (Start)
Number of nonzero digits needed to write all integers from 1 up to 10^n - 1.
a(n) is a square iff n in { A016754 union A033583\{0} } (see formulas). (End)

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[9 x/(10 x - 1)^2, {x, 0, 18}], x] (* or *)
    Array[9 # 10^(# - 1) &, 18] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    mtrans(n, b) = n*(b-1)*b^(n-1);
    a(n) = mtrans(n, 10);
    
  • Python
    def a(n): return 9*n*10**(n-1)
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Nov 14 2022

Formula

a(n) = n*(b-1)*b^(n-1) with b=10.
From R. J. Mathar, Oct 15 2013: (Start)
G.f.: 9*x/(10*x-1)^2.
a(n) = 9*A053541(n). (End)
From Bernard Schott, Nov 14 2022: (Start)
a(n+1) - a(n) = 9*A081045(n).
a(n) = A113119(n) for n > 1.
a(n) = A033713(n+1) - A033713(n) = A033714(n+1) - A033714(n).
a(A016754(n)) = (3 * (2n+1) * 10^(2*n*(n+1)))^2.
a(A033583(n)) = (3 * n * 10^(5*n^2))^2. (End)
From Elmo R. Oliveira, May 13 2025: (Start)
E.g.f.: 9*x*exp(10*x).
a(n) = A008591(n)*A011557(n-1).
a(n) = 20*a(n-1) - 100*a(n-2) for n > 2. (End)

A014925 Number of zeros in numbers 1 to 111...1 (n+1 digits).

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 10987654321, 120987654321, 1320987654321, 14320987654321, 154320987654321, 1654320987654321, 17654320987654321, 187654320987654321, 1987654320987654321, 20987654320987654321, 220987654320987654321
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033713.

Programs

Formula

a(1) = 1; for n>1, a(n) = n*10^(n-1) + a(n-1).
G.f.: x/((1-x)*(1-10*x)^2).
a(n) = 10^n*(n+1)/9 - (1/81)*10^(n+1) + 1/81.
a(n) = (10^n*(9*n - 1) + 1)/81. - Kenneth E. Caviness, Mar 30 2011
E.g.f.: (1 - exp(9*x) + 90*x*exp(9*x))*exp(x)/81. - Ilya Gutkovskiy, May 02 2016
a(n) = Sum_{i=0..n} i*10^(i-1). - José de Jesús Camacho Medina, Dec 14 2016
From Elmo R. Oliveira, May 24 2025: (Start)
a(n) = 20*a(n-1) - 100*a(n-2) + 1 for n > 2.
a(n) = 21*a(n-1) - 120*a(n-2) + 100*a(n-3) for n > 3. (End)

Extensions

Better description from Stephen G Penrice, Oct 03 2000
More terms from Elmo R. Oliveira, May 24 2025

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

A033714 Number of zeros in numbers 0 to 999..9 (n digits).

Original entry on oeis.org

1, 10, 190, 2890, 38890, 488890, 5888890, 68888890, 788888890, 8888888890, 98888888890, 1088888888890, 11888888888890, 128888888888890, 1388888888888890, 14888888888888890, 158888888888888890, 1688888888888888890, 17888888888888888890, 188888888888888888890
Offset: 1

Views

Author

Olivier Gorin (gorin(AT)roazhon.inra.fr)

Keywords

Comments

This sequence also gives the total count of digits of n below 10^n. In such counts it makes sense to omit 10^0 as we are interested in having ten digits under each power of 10. For each power of 10 the total number of digits 0-9 is always the total of zeros for the next power. For example, at 10^1 there is 1 of each numeral 0-9, total 10 digits. At 10^2, the number of zeros is 10, with 20 each for the other 9 numerals and so on. - Enoch Haga, May 13 2006
Also the position of 10^n in Champernowne's constant (A033307). See Sikora, p. 3. - Robert G. Wilson v, Jun 29 2014

Crossrefs

Cf. A212704 (first differences).

Programs

  • Magma
    [(9*n*10^n-10*10^n+100)/90: n in [1..20]]; // Vincenzo Librandi, Jul 01 2014
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = 9*10^(n-2)*(n-1) + a[n-1]; Table[a[n], {n, 1, 17}] (* Jean-François Alcover, Jul 13 2012 *)
    f[n_] := 1 + Sum[9 m*10^(m - 1), {m, n}]; Array[f, 18, 0] (* Robert G. Wilson v, Jun 29 2014 *)
    LinearRecurrence[{21,-120,100},{1,10,190},20] (* Harvey P. Dale, Dec 03 2021 *)
  • PARI
    Vec(-x*(100*x^2-11*x+1)/((x-1)*(10*x-1)^2)  + O(x^100)) \\ Colin Barker, Jan 27 2015

Formula

a(n) = 10^(n-1)*n - (1/9)*10^n + 10/9. - Robert Israel, Jun 30 2014
G.f.: -x*(100*x^2-11*x+1) / ((x-1)*(10*x-1)^2). - Colin Barker, Jan 27 2015
From Bernard Schott, Nov 20 2022: (Start)
a(n) = A033713(n) + 1.
a(n+1) = a(n) + 9 * A053541(n). (End)

Extensions

More terms from Erich Friedman

A072290 Number of digits in the decimal expansion of the Champernowne constant that must be scanned to encounter all n-digit strings.

Original entry on oeis.org

1, 11, 192, 2893, 38894, 488895, 5888896, 68888897, 788888898, 8888888899, 98888888900, 1088888888901, 11888888888902, 128888888888903, 1388888888888904, 14888888888888905, 158888888888888906, 1688888888888888907, 17888888888888888908, 188888888888888888909
Offset: 0

Views

Author

Lekraj Beedassy, Jul 11 2002

Keywords

Comments

"Decimal expansion of the Champernowne constant" excludes the initial 0 to the left of the decimal point.
In writing out all numbers 1 through 10^n inclusive, exactly a(n) digits are used, of which a(n-1) are 0's and there are n*10^(n-1) of each of the other digits, with still an extra one for 1's.

References

  • J. D. E. Konhauser et al. "Digit Counting." Problem 134 in Which Way Did The Bicycle Go? Dolciani Math. Exp. No. 18. Washington, DC: Math. Assoc. Amer., pp. 40 and 173-174, 1996.

Crossrefs

Cf. A078427.

Programs

  • Magma
    [(10^(n-1)*n+n-10^n/9+1/9): n in [1..30]]; // Vincenzo Librandi, Jun 06 2011
  • Maple
    A072290:=n->10/9 - 10^n/9 + n + n*10^n: seq(A072290(n), n=0..30); # Wesley Ivan Hurt, Jul 06 2014
  • Mathematica
    f[n_] := 10/9 - 10^n/9 + n + n*10^n; Array[f, 20, 0] (* Robert G. Wilson v, Jul 06 2014 *)
  • PARI
    for(n=1,23,print1(10^(n-1)*n+n-10^n/9+1/9" "));
    
  • PARI
    Vec((91*x^2-11*x+1)/((x-1)^2*(10*x-1)^2) + O(x^100)) \\ Colin Barker, May 22 2014
    

Formula

a(n) = 10/9 - 10^n/9 + n + n*10^n.
a(n+1) = a(n) + 9*(n+1)*10^n + 1.
a(n+1) = n + A053541(n) - A002275(n) = n + A033713(n). - Lekraj Beedassy, Sep 16 2006
a(n) = 22*a(n-1) - 141*a(n-2) + 220*a(n-3) - 100*a(n-4). - Colin Barker, May 22 2014
G.f.: (91*x^2-11*x+1) / ((x-1)^2*(10*x-1)^2). - Colin Barker, May 22 2014

Extensions

More terms from Jason Earls, Dec 18 2002
Description rewritten by Eric W. Weisstein, Sep 14 2013
More terms from Colin Barker, May 22 2014

A023103 (10^n)-th digit of infinite string 12345678910111213141516...

Original entry on oeis.org

1, 1, 5, 3, 7, 2, 1, 7, 8, 1, 1, 0, 1, 5, 7, 2, 6, 4, 3, 5, 3, 5, 4, 9, 6, 2, 4, 8, 7, 1, 1, 3, 7, 2, 3, 0, 8, 5, 3, 8, 2, 7, 6, 7, 9, 9, 2, 7, 0, 1, 6, 2, 0, 4, 1, 3, 8, 5, 3, 3, 3, 5, 0, 0, 1, 1, 5, 6, 1, 6, 2, 4, 3, 7, 5, 6, 8, 5, 3, 6, 8, 8, 2, 2, 0, 3, 9, 1, 8, 9, 2, 1, 1, 9, 6, 4, 4, 0, 2, 6, 4, 1, 0, 1, 4, 2, 8, 4
Offset: 0

Views

Author

Keywords

Comments

In one of Ross Honsberger's "Mathematical Gems" series (Dolciani Mathematical Expositions, Mathematical Association of America) there is a formula for extracting the n-th digit. Would someone submit it? [Robert Wilson notes that the Mathematica program below implements this formula.]

References

  • Lucio Artiaga and Lloyd D. Davis, Algorithms and Their Computer Solutions, Merrill, 1972, p. 160.
  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.

Crossrefs

10^n-th digit in the almost natural number (A007376).
Cf. Champernowne constant or Mahler's number A033307.
Cf. A033713.

Programs

  • Mathematica
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[10^#, 10] &, 105, 0] (* modified by Robert G. Wilson v, Jul 15 2014 *)

Extensions

Edited by Robert G. Wilson v, Jun 18 2002

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

A316492 Numbers k such that the average digit in the concatenation of the numbers from 1 through k is an integer.

Original entry on oeis.org

1, 3, 5, 7, 9, 122, 576, 1422, 1876, 4122, 4576
Offset: 1

Views

Author

Jon E. Schoenfield, Aug 11 2018

Keywords

Comments

Equivalently, numbers k such that A058183(k) divides A037123(k).
4576 is the final term; 4 < A037123(k)/A058183(k) < 5 for all k > 4576.

Examples

			9 is a term because the average digit in 123456789 is (1+2+3+4+5+6+7+8+9)/9 = 45/9 = 5 (an integer).
122 is a term because 12345789101112..119120121122 has digit sum 1032 and digit count 258, and 1032/258 = 4 (an integer).
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Position[ Divide @@@ Transpose[ Accumulate /@ {Total /@ #, Length /@ #} &@ IntegerDigits@ Range@ 5000], Integer] (* _Giovanni Resta, Aug 12 2018 *)

A338226 a(n) = Sum_{i=0..n-1} i*10^i - Sum_{i=0..n-1} (n-1-i)*10^i.

Original entry on oeis.org

0, 9, 198, 3087, 41976, 530865, 6419754, 75308643, 864197532, 9753086421, 108641975310, 1197530864199, 13086419753088, 141975308641977, 1530864197530866, 16419753086419755, 175308641975308644, 1864197530864197533, 19753086419753086422, 208641975308641975311, 2197530864197530864200
Offset: 1

Views

Author

Abhinav S. Sharma, Oct 17 2020

Keywords

Comments

Note that adding a constant k does not change the result: a(n) = (Sum_{i=0..n-1} (k+i) * 10^i) - (Sum_{i=0..n-1} (k+n-1-i) * 10^i). This means any set of consecutive numbers may be used to generate the terms.
a(n) = A019566(n) for n <= 9. This is an alternate generalization of A019566 beyond n=9.
For two numbers A = Sum_{i=0..n-1} (x_i) * b^i and A' = Sum_{i=0..n-1} (x'i) * b^i, A-A' is divisible by b-1 if Sum{i=0..n-1} (x_i) = Sum_{i=0..n-1} (x'_i). x_i and x'_i are sets of integers. This is because b^i == 1 (mod b-1). In this specific case b=10, hence all terms are divisible by 9 and are given by a(n) = 9*A272525(n-1).

Crossrefs

Cf. A033713 (first differences), A019566 ("unique" numbers).

Programs

  • Mathematica
    LinearRecurrence[{22, -141, 220, -100}, {0, 9, 198, 3087}, 21] (* Amiram Eldar, Oct 26 2020 *)
  • PARI
    concat(0, Vec(9*x^2 / ((1 - x)^2*(1 - 10*x)^2) + O(x^20))) \\ Colin Barker, Oct 27 2020

Formula

a(n) = A052245(n) - A014824(n).
a(n+1) - a(n) = A033713(n+1).
a(n) = ((9*n - 11)*10^n + (9*n + 11))/81. - Andrew Howroyd, Oct 26 2020
From Colin Barker, Oct 26 2020: (Start)
G.f.: 9*x^2 / ((1 - x)^2*(1 - 10*x)^2).
a(n) = 22*a(n-1) - 141*a(n-2) + 220*a(n-3) - 100*a(n-4) for n>4.
(End)
E.g.f.: exp(x)*(11 + 9*x + exp(9*x)*(90*x - 11))/81. - Stefano Spezia, Oct 27 2020
Showing 1-10 of 10 results.