OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,1,-6).
FORMULA
a(n):=5*a(n-1)+6*a(n-2)+4, a(0)=0, a(1)=1. [Zerinvary Lajos, Dec 14 2008]
a(n)= 6*a(n-1) +a(n-2) -6*a(n-3). a(n) = 9*6^n/35 - 2/5 + (-1)^n/7. [R. J. Mathar, Oct 05 2009]
G.f.: x*(3*x+1) / ((x-1)*(x+1)*(6*x-1)). [Colin Barker, Dec 27 2012]
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=5*a[n-1]+6*a[n-2]+4 od: seq(a[n], n=1..33); # Zerinvary Lajos, Dec 14 2008
MATHEMATICA
CoefficientList[Series[(3 x + 1)/((x - 1) (x + 1) (6 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 21 2013 *)
PROG
(Magma) [9*6^n/35-2/5+(-1)^n/7: n in [1..30]]; // Vincenzo Librandi, Oct 21 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved