OFFSET
0,2
COMMENTS
a(n-1) is the number of compositions of n when there is 1 type of 1 and 8 types of other natural numbers. - Milan Janjic, Aug 13 2010
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2, 7).
FORMULA
G.f.: (1+7*x)/(1-2*x-7*x^2).
a(n) = binomial transform of 1,8,8,64,64,512. - Al Hakanson (hawkuu(AT)gmail.com), Aug 17 2009
If p[1]=1, and p[i]=8,(i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=det A. - Milan Janjic, Apr 29 2010
G.f.: G(0)/(2*x) - 1/x, where G(k)= 1 + 1/(1 - x*(8*k-1)/(x*(8*k+7) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 28 2013
MATHEMATICA
CoefficientList[Series[(1 + 7 x)/(1 - 2 x - 7 x^2), {x, 0, 25}], x] (* Or *) a[n_] := Simplify[((1 + Sqrt[8])^n + (1 - Sqrt[8])^n)/2]; Array[a, 25, 0] (* Or *) LinearRecurrence[{2, 7}, {1, 1}, 28] (* Or *) Table[ MatrixPower[{{1, 2}, {4, 1}}, n][[1, 1]], {n, 0, 25}] (* Robert G. Wilson v, Sep 18 2013 *)
PROG
(PARI) a(n)=([0, 1; 7, 2]^n*[1; 9])[1, 1] \\ Charles R Greathouse IV, Apr 06 2016
(PARI) x='x+O('x^30); Vec((1+7*x)/(1-2*x-7*x^2)) \\ G. C. Greubel, Jan 08 2018
(Magma) I:=[1, 1]; [n le 2 select I[n] else 2*Self(n-1) + 7*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 08 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Apr 23 2003
STATUS
approved