OFFSET
0,2
COMMENTS
Apart from first term, the same as A052944. - R. J. Mathar, Jun 12 2008
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
Binomial transform of [1, 1, 2, 0, 2, 0, 2, 0, 2, ...].
From Colin Barker, Aug 12 2012: (Start)
a(n) = 4*a(n-1) -5*a(n-2) +2*a(n-3) for n>3.
G.f.: (1 -2*x +2*x^2 -2*x^3)/((1-x)^2*(1-2*x)). (End)
From G. C. Greubel, Feb 14 2021: (Start)
a(n) = 2^n + n - 1 + [n=0].
E.g.f.: 1 - (1-x)*exp(x) + exp(2*x). (End)
EXAMPLE
a(4) = 19 = sum of row 4 terms of triangle A132735: (1 + 5 + 7 + 5 + 1).
a(3) = 10 = (1, 3, 3, 1) dot (1, 1, 2, 0) = (1 + 3 + 6 + 0).
MAPLE
a:= proc(n) option remember; if n=0 then 1 else add((binomial(n, j)+1), j=0..n-1) fi end: seq(a(n), n=0..31); # Zerinvary Lajos, Mar 29 2009
MATHEMATICA
Table[2^n + n-1 + Boole[n==0], {n, 0, 30}] (* G. C. Greubel, Feb 14 2021 *)
PROG
(Sage) [1]+[2^n + n-1 for n in (1..30)] # G. C. Greubel, Feb 14 2021
(Magma) [1] cat [2^n + n-1: n in [1..30]]; // G. C. Greubel, Feb 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Aug 26 2007
EXTENSIONS
More terms from R. J. Mathar, Jun 12 2008
STATUS
approved