OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Peter Kagey, Example of a(4) = 52.
FORMULA
a(n) = 7*n^2 - 18*n + 12 for n >= 3, with a(1) = 1, a(2) = 5.
a(n) = A186862(n)/8+1 for n >= 3. - Hugo Pfoertner, Dec 10 2020
From Stefano Spezia, Dec 10 2020: (Start)
G.f.: x*(1 + 2*x + 9*x^2 + 3*x^3 - x^4)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End)
MATHEMATICA
Join[{1, 5}, LinearRecurrence[{3, -3, 1}, {21, 52, 97}, 49]] (* Amiram Eldar, Dec 10 2020 *)
PROG
(Magma) [1, 5] cat [7*n^2-18*n+12 : n in [3..80]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 10 2020
STATUS
approved