OFFSET
0,2
LINKS
FORMULA
For n >= 2, a(n) = 3*n^2 + 3*n + 1 = A003215(n).
For n >= 5, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f. (1 + 3*x + 4*x^2 - 3*x^3 + x^4) / (1 - x)^3.
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {1, 6, 19, 37, 61}, 60] (* Harvey P. Dale, Nov 03 2024 *)
PROG
(PARI) a(n)=if(n==1, 6, 3*n*(n+1)+1) \\ Charles R Greathouse IV, Aug 15 2022
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Max Alekseyev, Aug 15 2022
STATUS
approved