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-6 of 6 results.

A088924 Number of "9ish numbers" with n digits.

Original entry on oeis.org

1, 18, 252, 3168, 37512, 427608, 4748472, 51736248, 555626232, 5900636088, 62105724792, 648951523128, 6740563708152, 69665073373368, 716985660360312, 7352870943242808, 75175838489185272, 766582546402667448
Offset: 1

Views

Author

Marc LeBrun, Oct 23 2003

Keywords

Comments

First difference of A016189. ("9" can be replaced by any other nonzero digit, however only the 9ish numbers are closed under lunar multiplication.)
See A257285 - A257289 for first differences of 5^n-4^n, ..., 9^n-8^n. These also give the number of n-digit numbers whose largest digit is 5, 6, 7, 8, respectively. - M. F. Hasler, May 04 2015

Examples

			a(2) = 18 because 19, 29, 39, 49, 59, 69, 79, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 and 99 are the eighteen two-digit 9ish numbers.
		

Crossrefs

Programs

Formula

a(n) = 9*10^(n-1) - 8*9^(n-1).
G.f.: x*(1 - x)/(1 - 19*x + 90*x^2). - Bobby Milazzo, May 02 2014
a(n) = 19*a(n-1) - 90*a(n-2). - Vincenzo Librandi, May 04 2015
E.g.f.: (81*exp(10*x) - 80*exp(9*x) - 1)/90. - Stefano Spezia, Nov 16 2023

A255463 a(n) = 3*4^n - 2*3^n.

Original entry on oeis.org

1, 6, 30, 138, 606, 2586, 10830, 44778, 183486, 747066, 3027630, 12228618, 49268766, 198137946, 795740430, 3192527658, 12798808446, 51281327226, 205383589230, 822309197898, 3291561314526, 13173218826906, 52713796014030, 210917946175338, 843860071059006, 3376005143308986, 13505715150454830
Offset: 0

Views

Author

Keywords

Comments

a(n-1) is also the number of n-digit numbers whose largest decimal digit is 3. - Stefano Spezia, Nov 15 2023

Crossrefs

Cf. A255462.
First differences of 4^n - 3^n = A005061(n). See A257285, A257286, A257287, A257288, A257289 for first differences of 5^n - 4^n, ..., 9^n - 8^n. - M. F. Hasler, May 04 2015

Programs

Formula

G.f.: (1-x)/((1-3*x)*(1-4*x)).
a(n+1) = 7*a(n) - 12*a(n-1) with a(0)=1, a(1)=6.
a(n) = A255462(2^n-1).
E.g.f.: exp(3*x)*(3*exp(x) - 2). - Stefano Spezia, Nov 15 2023

Extensions

Simpler definition from N. J. A. Sloane, Mar 10 2015

A257285 a(n) = 4*5^n - 3*4^n.

Original entry on oeis.org

1, 8, 52, 308, 1732, 9428, 50212, 263348, 1365892, 7026068, 35916772, 182729588, 926230852, 4681485908, 23608756132, 118849087028, 597466660612, 3000218204948, 15052630632292, 75469311591668, 378171191679172, 1894154493279188, 9483966605929252
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 5^n - 4^n = A005060.
a(n-1) is the number of numbers with n digits having the largest digit equal to 4. Note that this is independent of the base b>4. Equivalently, number of n-letter words over a 5-letter alphabet {a,b,c,d,e}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [4*5^n-3*4^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[4 5^n - 3 4^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
  • PARI
    a(n)=4*5^n-3*4^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-4*x)*(1-5*x)).
a(n) = 9*a(n-1) - 20*a(n-2). - (End)
E.g.f.: exp(4*x)*(4*exp(x) - 3). - Stefano Spezia, Nov 15 2023

A257287 a(n) = 6*7^n - 5*6^n.

Original entry on oeis.org

1, 12, 114, 978, 7926, 61962, 472614, 3541578, 26190726, 191733162, 1392520614, 10049975178, 72163811526, 516030592362, 3677517616614, 26134444136778, 185292033880326, 1311149786699562, 9262681804120614, 65346572412186378
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 7^n - 6^n = A016169.
a(n-1) is the number of numbers with n digits having the largest digit equal to 6. Note that this is independent of the base b > 6.
Equivalently, number of n-letter words over a 7-letter alphabet {a,b,c,d,e,f,g}, which must not start with the first letter of the alphabet, and in which the last letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [6*7^n-5*6^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
  • Mathematica
    Table[6 7^n - 5 6^n, {n, 0, 30}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{13,-42},{1,12},20] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    a(n)=6*7^n-5*6^n
    

Formula

From Vincenzo Librandi, May 04 2015: (Start)
G.f.: (1-x)/((1-6*x)*(1-7*x)).
a(n) = 13*a(n-1) - 42*a(n-2). (End)
E.g.f.: exp(6*x)*(6*exp(x) - 5). - Stefano Spezia, Nov 15 2023

A257289 a(n) = 8*9^n - 7*8^n.

Original entry on oeis.org

1, 16, 200, 2248, 23816, 243016, 2416520, 23583688, 226933256, 2159839816, 20378082440, 190918934728, 1778399954696, 16486635929416, 152228014061960, 1400838452135368, 12853836673840136, 117654854901535816, 1074656292809619080, 9798007424852945608
Offset: 0

Views

Author

M. F. Hasler, May 03 2015

Keywords

Comments

First differences of 9^n - 8^n = A016185.
a(n-1) is the number of numbers with n digits having the largest digit equal to 8. Note that this is independent of the base b > 8.
Equivalently, number of n-letter words over a 9-letter alphabet, which must not start with the last letter of the alphabet, and in which the first letter of the alphabet must appear.

Crossrefs

Programs

  • Magma
    [8*9^n-7*8^n: n in [0..20]]; // Vincenzo Librandi, May 04 2015
    
  • Mathematica
    Table[8 9^n - 7 8^n, {n, 0, 20}] (* Vincenzo Librandi, May 04 2015 *)
    LinearRecurrence[{17,-72},{1,16},30] (* Harvey P. Dale, May 26 2019 *)
  • PARI
    a(n)=8*9^n-7*8^n
    
  • Sage
    [8*9^n-7*8^n for n in (0..20)] # Bruno Berselli, May 04 2015

Formula

G.f.: (1-x)/((1-8*x)*(1-9*x)). - Vincenzo Librandi, May 04 2015
E.g.f.: exp(8*x)*(8*exp(x) - 7). - Stefano Spezia, Nov 15 2023

A125373 Number of base 10 circular n-digit numbers with adjacent digits differing by 5 or less.

Original entry on oeis.org

1, 10, 80, 580, 4660, 37960, 311378, 2559658, 21057948, 173287588, 1426133270, 11737272106, 96600478510, 795047628502, 6543462720560, 53854541701240, 443238127915788, 3647975524214452, 30023874009147704, 247105006940966092
Offset: 0

Views

Author

R. H. Hardin, Dec 28 2006

Keywords

Comments

[Empirical] a(base,n)=a(base-1,n)+F(5) for base>=5.int(n/2)+1 and F(d) is the largest coefficient in (1+x+...+x^(2d))^n

Programs

  • Mathematica
    LinearRecurrence[{11,-21,-19,34,8,-15,-1,2},{1,10,80,580,4660,37960,311378,2559658,21057948},30] (* Harvey P. Dale, May 14 2018 *)

Formula

G.f.: (1 - x - 9*x^2 - 71*x^3 + 116*x^4 + 52*x^5 - 87*x^6 - 9*x^7 + 16*x^8)/((1 + x)(1 - 3*x + x^3)(1 - 9*x + 6*x^2 + 3*x^3 - 2*x^4)). For n<4, a(n) = 5*6^n-4*5^n = A257286(n). - M. F. Hasler, May 03 2015
Showing 1-6 of 6 results.