OFFSET
1,2
LINKS
Kelvin Voskuijl, Table of n, a(n) for n = 1..10000
Ilario Miriello, Step 1,2,3, Youtube video, Jul 16 2020.
Ilario Miriello, Illustration for a(2) and a(3)
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (8*n^3 - 12*n^2 + 7*n)/3.
From Colin Barker, Jul 17 2020: (Start)
G.f.: x*(1 + 3*x)^2 / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4. (End)
E.g.f.: exp(x)*x*(3 + 12*x + 8*x^2)/3. - Stefano Spezia, Jul 23 2020
a(n+1) - a(n) = 8*n^2 + 1 = A081585(n). - Charlie Marion, Mar 21 2022
MATHEMATICA
Table[(8*n^3 - 12*n^2 + 7*n)/3, {n, 1, 50}] (* Amiram Eldar, Jul 16 2020 *)
(* Alternative: *)
LinearRecurrence[{4, -6, 4, -1}, {1, 10, 43, 116}, 50] (* Harvey P. Dale, Sep 12 2021 *)
PROG
(Magma) [(8*n^3 - 12*n^2 + 7*n)/3 : n in [1..50]]; // Wesley Ivan Hurt, Jul 16 2020
(PARI) a(n) = (8*n^3 - 12*n^2 + 7*n)/3; \\ Michel Marcus, Jul 16 2020
(PARI) Vec(x*(1 + 3*x)^2 / (1 - x)^4 + O(x^40)) \\ Colin Barker, Jul 17 2020
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Ilario Miriello, Jul 16 2020
EXTENSIONS
More terms from Michel Marcus, Jul 16 2020
STATUS
approved
