[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257287
a(n) = 6*7^n - 5*6^n.
5
1, 12, 114, 978, 7926, 61962, 472614, 3541578, 26190726, 191733162, 1392520614, 10049975178, 72163811526, 516030592362, 3677517616614, 26134444136778, 185292033880326, 1311149786699562, 9262681804120614, 65346572412186378
OFFSET
0,2
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.
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
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 *)
PROG
(PARI) a(n)=6*7^n-5*6^n
(Magma) [6*7^n-5*6^n: n in [0..30]]; // Vincenzo Librandi, May 04 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, May 03 2015
STATUS
approved