OFFSET
1,2
COMMENTS
In groups of two, add and multiply the integers: 0+1, 2*3, 4+5, 6*7, ....
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
From Colin Barker, Jan 05 2020: (Start)
G.f.: x*(1 + 6*x + 6*x^2 + 24*x^3 - 7*x^4 + 2*x^5) / ((1 - x)^3*(1 + x)^3).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>6.
a(n) = (1/2)*(-1 + 5*(-1)^n - 2*(1 + 5*(-1)^n)*n + 4*(1+(-1)^n)*n^2).
(End)
E.g.f.: (2 + 4*x*(1 + x))*cosh(x) - (3 + 2*x)*sinh(x) - 2. - Stefano Spezia, Jan 05 2020 after Colin Barker
MATHEMATICA
a[n_]:=If[OddQ[n], 4n-3, 2(n-1)(2n-1)]; Array[a, 53] (* Stefano Spezia, Jan 05 2020 *)
PROG
(PARI) Vec(x*(1 + 6*x + 6*x^2 + 24*x^3 - 7*x^4 + 2*x^5) / ((1 - x)^3*(1 + x)^3) + O(x^50)) \\ Colin Barker, Jan 07 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
George E. Antoniou, Jan 05 2020
STATUS
approved