OFFSET
1,2
COMMENTS
Essentially the same as A055999. - R. J. Mathar, Mar 28 2012
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3, -3, 1).
FORMULA
Binomial transform of (1, 3, 2, -1, 1, -1, 1, -1, 1, ...).
From G. C. Greubel, Feb 17 2021: (Start)
a(n) = (n-1)*(n+6)/2 + [n=1].
G.f.: x*(1 +x -x^3)/(1-x)^3.
E.g.f.: 3 + x + (-6 +6*x +x^2)*exp(x)/2. (End)
EXAMPLE
a(4) = 15 = sum of row 4 terms of triangle A134226: (1 + 2 + 8 + 4).
a(4) = 15 = (1, 3, 3, 1) dot (1, 3, 2, -1) = (1 + 9 + 6 - 1).
MATHEMATICA
Table[(n-1)*(n+6)/2 + Boole[n==1], {n, 70}] (* G. C. Greubel, Feb 17 2021 *)
LinearRecurrence[{3, -3, 1}, {1, 4, 9, 15}, 70] (* Harvey P. Dale, Aug 13 2024 *)
PROG
(Sage) [1]+[(n-1)*(n+6)/2 for n in (2..70)] # G. C. Greubel, Feb 17 2021
(Magma) [1] cat [(n-1)*(n+6)/2: n in [2..70]]; // G. C. Greubel, Feb 17 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Oct 14 2007
EXTENSIONS
Terms a(37) onward added by G. C. Greubel, Feb 17 2021
STATUS
approved