OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (10,-17,8).
FORMULA
a(n) = (8^(n+1)-7*n-8)/49. - Rolf Pleisch, Oct 21 2010
a(n) = Sum_{i=0..n-1} 7^i*binomial(n+1,n-1-i). [Bruno Berselli, Nov 13 2015]
From Colin Barker, Jun 03 2020: (Start)
G.f.: x / ((1 - x)^2*(1 - 8*x)).
a(n) = 10*a(n-1) - 17*a(n-2) + 8*a(n-3) for n>3.
(End)
EXAMPLE
For n=5, a(5) = 1*15 + 7*20 + 7^2*15 + 7^3*6 + 7^4*1 = 5349. [Bruno Berselli, Nov 13 2015]
MAPLE
a:=n->sum((8^(n-j)-1)/7, j=0..n): seq(a(n), n=1..19); # Zerinvary Lajos, Jan 15 2007
a:= n-> (Matrix ([[1, 0, 1], [1, 1, 1], [0, 0, 8]])^n)[2, 3]: seq (a(n), n=1..25); # Alois P. Heinz, Aug 06 2008
MATHEMATICA
Table[(8^(n + 1) - 7 n - 8)/49, {n, 1, 25}] (* Bruno Berselli, Nov 13 2015 *)
PROG
(PARI) Vec(x / ((1 - x)^2*(1 - 8*x)) + O(x^25)) \\ Colin Barker, Jun 03 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved