OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
See A348227 for G.f.
a(n) = (18*n^2 + 2*n - 17 + (2*n - 3)*(-1)^n)/4 for n >= 3. - Charles R Greathouse IV, May 31 2026
a(n) ~ 9*n^2/2. - Charles R Greathouse IV, May 31 2026
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 5, 17, 37, 71, 109, 163, 217}, 100] (* Paolo Xausa, Feb 28 2024 *)
PROG
(PARI) a(n)=if(n>2, (9*n^2+(2-n%2*2)*n+-10+n%2*3)/2, [1, 5, 17][n+1]) \\ Charles R Greathouse IV, May 31 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 08 2021
STATUS
approved
