OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-9,4).
FORMULA
a(n) = A142458(n+1,n).
a(n) = A020988(n) - n. - R. J. Mathar, Nov 21 2008
G.f.: x*(1+2*x)/((1-x)^2*(1-4*x)). - Colin Barker, Jan 11 2012
a(1)=1, a(2)=8, a(3)=39, a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3). - Harvey P. Dale, Mar 17 2015
E.g.f.: (1/3)*(-2 - 3*x + 2*exp(x))*exp(x). - G. C. Greubel, Mar 28 2021
MATHEMATICA
Table[2(4^n-1)/3 -n, {n, 30}] (* or *) LinearRecurrence[{6, -9, 4}, {1, 8, 39}, 30] (* Harvey P. Dale, Mar 17 2015 *)
PROG
(Magma) [(2^(2*n+1) -3*n -2)/3: n in [1..50]]; // G. C. Greubel, Mar 28 2021
(Sage) [(2^(2*n+1) -3*n -2)/3 for n in (1..50)] # G. C. Greubel, Mar 28 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 01 2008
STATUS
approved