OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-1,-1).
FORMULA
a(n)=2*a(n-1)+a(n-2)+5; a(0)=1, a(1)=6.
a(n)=[ {(6+(7/2)*sqrt(2))(1+sqrt(2))^n - (6-(7/2)*sqrt(2))(1-sqrt(2))^n}/ 2*sqrt(2) ]-5/2.
G.f. ( 1+4*x ) / ( (x-1)*(x^2+2*x-1) ). - R. J. Mathar, Nov 08 2012
a(0)=1, a(1)=7, a(2)=20, a(n)=3*a(n-1)-a(n-2)-a(n-3). - Harvey P. Dale, Mar 29 2013
MATHEMATICA
Accumulate[LinearRecurrence[{2, 1}, {1, 6}, 30]] (* or *) LinearRecurrence[ {3, -1, -1}, {1, 7, 20}, 40] (* Harvey P. Dale, Mar 29 2013 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Mar 29 2013
STATUS
approved