OFFSET
0,1
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Bruno Berselli, Triangular spiral which contains the terms of A235537 (see A051682).
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: (6 + 13*x - 8*x^2 - 8*x^3 + 6*x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (6*n*(3*n + 17) - (2*n + 43)*(-1)^n + 11)/16 + 8. The terms a(2k) are in A235332; the closed form of the terms a(2k+1) is n*(9*n+35)/2+19.
MATHEMATICA
Table[(6 n (3 n + 17) - (2 n + 43) (-1)^n + 11)/16 + 8, {n, 0, 50}]
LinearRecurrence[{1, 2, -2, -1, 1}, {6, 19, 23, 41, 49}, 80] (* Harvey P. Dale, Aug 22 2015 *)
PROG
(Magma) [(6*n*(3*n+17)-(2*n+43)*(-1)^n+11)/16+8: n in [0..50]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jan 23 2014
STATUS
approved