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 14 results. Next

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)

A094798 Number of times 1 is used in writing out all the numbers 1 through n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18
Offset: 1

Views

Author

Lekraj Beedassy, Jun 11 2004

Keywords

Comments

The number of 1's required to write all integers of n or fewer digits (i.e., the sequence a(9), a(99), a(999), ...) is 1, 20, 300, 4000, ..., which is A053541. - Jason D. W. Taff (jtaff(AT)jburroughs.org), Dec 05 2004
A014778 gives the fixed points. - David Wasserman, Feb 22 2005
Partial sums of A268643. - Robert Israel, Oct 28 2016

Crossrefs

Programs

  • Maple
    nones:=proc(n) local nn,c,j: nn:=convert(n,base,10): c:=0: for j to nops(nn) do if nn[j]=1 then c:=c+1 else end if end do: c end proc: a:=proc(n) options operator, arrow: add(nones(k),k=1..n) end proc: seq(a(n),n=1..75); # Emeric Deutsch, Mar 01 2008
    ListTools:-PartialSums([seq(numboccur(1,convert(n,base,10)),n=1..100)]); # Robert Israel, Oct 28 2016
  • Mathematica
    Accumulate[Table[DigitCount[n,10,1],{n,80}]] (* Harvey P. Dale, Sep 27 2013 *)
  • PARI
    a(n) = sum(k=1, n, #select(x->(x==1), digits(k))); \\ Michel Marcus, Oct 03 2023
  • Python
    from itertools import accumulate, count, islice
    def f(, n): return  + str(n).count("1")
    def agen(): yield from accumulate(count(1), f)
    print(list(islice(agen(), 75))) # Michael S. Branicky, Aug 09 2022
    

Formula

G.f. g(x) satisfies g(x) = x/((1-x)*(1-x^10)) + ((1-x^10)/(1-x))^2*g(x^10). - Robert Israel, Oct 28 2016 [corrected by Fabio Visonà, Aug 10 2022]

A081045 10th binomial transform of (1,9,0,0,0,0,0,...).

Original entry on oeis.org

1, 19, 280, 3700, 46000, 550000, 6400000, 73000000, 820000000, 9100000000, 100000000000, 1090000000000, 11800000000000, 127000000000000, 1360000000000000, 14500000000000000, 154000000000000000, 1630000000000000000, 17200000000000000000, 181000000000000000000
Offset: 0

Views

Author

Paul Barry, Mar 04 2003

Keywords

Comments

From Bernard Schott, Nov 12 2022: (Start)
For n >= 1, a(n-1) is the number of digits 1 (or any nonzero digit) that are necessary to write all the n-digit integers, while the corresponding number of digits 0 to write all these n-digit integers is A212704(n-1) for n >=2.
E.g.: a(2-1) = 19 since 19 digits 2's are required to write integers with a digit 2 from 10 up to 99: {12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92}.
First difference of A053541. (End)

Crossrefs

Programs

  • Magma
    [(9*n+10)*10^(n-1): n in [0..25]]; // Vincenzo Librandi, Aug 06 2013
  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 10 x)^2, {x, 0, 30}], x] (* Vincenzo Librandi, Aug 06 2013 *)
    LinearRecurrence[{20,-100},{1,19},20] (* Harvey P. Dale, Dec 28 2023 *)

Formula

a(n) = 20*a(n-1) - 100*a(n-2); a(0)=1, a(1)=19.
a(0)=1; for n>= 1, a(n) = (9*n+10)*10^(n-1) = 10^(n-1)*A017173(n+1).
a(n) = Sum_{k=0..n} (k+1)*9^k*binomial(n, k).
G.f.: (1-x)/(1-10*x)^2.
a(n) = A053541(n+1) - A053541(n), for n >= 1. - Bernard Schott, Nov 12 2022
E.g.f.: exp(10*x)*(1 + 9*x). - Stefano Spezia, Jan 31 2025

A081127 11th binomial transform of (0,1,0,0,0,0,0,...).

Original entry on oeis.org

0, 1, 22, 363, 5324, 73205, 966306, 12400927, 155897368, 1929229929, 23579476910, 285311670611, 3423740047332, 40799568897373, 483317970015034, 5696247503748615, 66835970710650416, 781145407680726737
Offset: 0

Views

Author

Paul Barry, Mar 07 2003

Keywords

Crossrefs

Programs

Formula

a(n) = 22*a(n-1) - 121*a(n-2), with a(0)=0, a(1)=1.
a(n) = n*11^(n-1).
G.f.: x/(1-11*x)^2.
a(n) = A003415(11^n). - Bruno Berselli, Oct 22 2013
From Amiram Eldar, Oct 28 2020: (Start)
Sum_{n>=1} 1/a(n) = 11*log(11/10).
Sum_{n>=1} (-1)^(n+1)/a(n) = 11*log(12/11). (End)
E.g.f.: x*exp(11*x). - G. C. Greubel, Jan 16 2024

A113119 Total number of digits in all n-digit nonnegative integers.

Original entry on oeis.org

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

Views

Author

Alexandre Wajnberg, Jan 03 2006

Keywords

Examples

			a(1)=10 because there are ten one-digit numbers (including the 0).
a(2)=180 because there are 100-10=90 two-digit numbers, for a total of 90*2=180 digits.
		

Crossrefs

Essentially the same as A212704.

Programs

  • Mathematica
    LinearRecurrence[{20,-100},{10,180,2700},20] (* Harvey P. Dale, Dec 09 2021 *)
  • PARI
    Vec(10*x*(1-2*x+10*x^2)/(1-10*x)^2 + O(x^20)) \\ Colin Barker, Aug 05 2016
    
  • Python
    def a(n): return 10 if n == 1 else 9*n*10**(n-1)
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Nov 14 2022

Formula

For n > 1, a(n) = 9*n*10^(n-1).
From Colin Barker, Aug 05 2016: (Start)
a(n) = 20*a(n-1) - 100*a(n-2) for n > 3.
G.f.: 10*x*(1 - 2*x + 10*x^2) / (1-10*x)^2.
(End)
From Bernard Schott, Nov 14 2022: (Start)
a(n) = A212704(n) for n > 1.
a(n) = 9 * A053541(n) for n > 1.
a(n) = 9 * A081045(n-1) + A212704(n-1), for n > 1 (means a(n) = number of nonzero digits + number of zero digits). (End)
E.g.f.: x*(1 + 9*exp(10*x)). - Stefano Spezia, Dec 24 2022

Extensions

More terms from Joshua Zucker, May 08 2006
a(17) corrected by Colin Barker, Aug 05 2016

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

A081128 12th binomial transform of (0,1,0,0,0,0,0,0,...).

Original entry on oeis.org

0, 1, 24, 432, 6912, 103680, 1492992, 20901888, 286654464, 3869835264, 51597803520, 681091006464, 8916100448256, 115909305827328, 1497904875307008, 19258776968232960, 246512345193381888
Offset: 0

Views

Author

Paul Barry, Mar 07 2003

Keywords

Crossrefs

Programs

Formula

a(n) = 24*a(n-1) - 132*a(n-2), a(0)=0, a(1)=1.
a(n) = n*12^(n-1).
G.f.: x/(1-12*x)^2.
From Amiram Eldar, Oct 28 2020: (Start)
Sum_{n>=1} 1/a(n) = 12*log(12/11).
Sum_{n>=1} (-1)^(n+1)/a(n) = 12*log(13/12). (End)
E.g.f.: x*exp(12*x). - G. C. Greubel, Jan 16 2024

A078427 Sum of all the decimal digits of numbers from 1 to 10^n.

Original entry on oeis.org

46, 901, 13501, 180001, 2250001, 27000001, 315000001, 3600000001, 40500000001, 450000000001, 4950000000001, 54000000000001, 585000000000001, 6300000000000001, 67500000000000001, 720000000000000001, 7650000000000000001, 81000000000000000001
Offset: 1

Views

Author

Shyam Sunder Gupta, Dec 29 2002

Keywords

Examples

			a(2)=901 because sum of all the digits of numbers from 1 to 10^2 is 901.
		

References

  • E. J. Barbeau et al., Five Hundred Mathematical Challenges, Problem 284. pp. 25; 142-143, MAA Washington DC, 1995.

Crossrefs

Programs

  • Magma
    [(45*n)*10^(n-1)+1: n in [1..30]]; // Vincenzo Librandi, Jun 06 2011
    
  • Mathematica
    LinearRecurrence[{21,-120,100},{46,901,13501},20] (* Harvey P. Dale, Nov 24 2016 *)
  • PARI
    Vec(-x*(100*x^2-65*x+46)/((x-1)*(10*x-1)^2) + O(x^100)) \\ Colin Barker, May 23 2014

Formula

a(n) = (45*n)*10^(n-1)+1.
a(n) = 45*A053541(n)+1. - Lekraj Beedassy, Sep 16 2006
a(n) = 21*a(n-1)-120*a(n-2)+100*a(n-3). - Colin Barker, May 23 2014
G.f.: -x*(100*x^2-65*x+46) / ((x-1)*(10*x-1)^2). - Colin Barker, May 23 2014

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010
More terms from Colin Barker, May 23 2014

A104002 Triangle T(n,k) read by rows: number of permutations in S_n avoiding all k-length patterns that start with 1 except one fixed pattern and containing it exactly once.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 12, 6, 1, 5, 32, 27, 8, 1, 6, 80, 108, 48, 10, 1, 7, 192, 405, 256, 75, 12, 1, 8, 448, 1458, 1280, 500, 108, 14, 1, 9, 1024, 5103, 6144, 3125, 864, 147, 16, 1, 10, 2304, 17496, 28672, 18750, 6480, 1372, 192, 18, 1, 11, 5120, 59049, 131072
Offset: 2

Views

Author

Ralf Stephan, Feb 26 2005

Keywords

Comments

T(n+k,k+1) = total number of occurrences of any given letter in all possible n-length words on a k-letter alphabet. For example, with the 2 letter alphabet {0,1} there are 4 possible 2-length words: {00,01,10,11}. The letter 0 occurs 4 times altogether, as does the letter 1. T(4,3) = 4. - Ross La Haye, Jan 03 2007
Table T(n,k) = k*n^(k-1) n,k > 0 read by antidiagonals. - Boris Putievskiy, Dec 17 2012

Examples

			Triangle begins:
  1;
  2,   1;
  3,   4,    1;
  4,  12,    6,    1;
  5,  32,   27,    8,   1;
  6,  80,  108,   48,  10,   1;
  7, 192,  405,  256,  75,  12,  1;
  8, 448, 1458, 1280, 500, 108, 14, 1;
		

Crossrefs

Programs

  • Mathematica
    Table[(n - k + 1) (k - 1)^(n - k), {n, 2, 12}, {k, 2, n}] // Flatten (* Michael De Vlieger, Aug 22 2018 *)

Formula

T(n, k) = (n-k+1) * (k-1)^(n-k), k<=n.
As a linear array, the sequence is a(n) = A004736(n)*A002260(n)^(A004736(n)-1) or a(n) = ((t*t+3*t+4)/2-n)*(n-(t*(t+1)/2))^((t*t+3*t+4)/2-n-1), where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 17 2012
Showing 1-10 of 14 results. Next