login
A298032
Partial sums of A298031.
2
1, 5, 15, 31, 61, 97, 145, 199, 265, 337, 421, 511, 613, 721, 841, 967, 1105, 1249, 1405, 1567, 1741, 1921, 2113, 2311, 2521, 2737, 2965, 3199, 3445, 3697, 3961, 4231, 4513, 4801, 5101, 5407, 5725, 6049, 6385, 6727, 7081, 7441, 7813, 8191, 8581, 8977, 9385, 9799, 10225, 10657, 11101, 11551
OFFSET
0,2
FORMULA
G.f.: -(2*x^6 - 8*x^4 - 3*x^3 - 5*x^2 - 3*x - 1) / ((1 - x)^2*(1 - x^2)).
From Colin Barker, Jan 25 2018: (Start)
a(n) = (9*n^2 - 6*n + 2) / 2 for n>2 and even.
a(n) = (9*n^2 - 6*n - 1) / 2 for n>2 and odd.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>4.
(End)
PROG
(PARI) Vec((1 + 3*x + 5*x^2 + 3*x^3 + 8*x^4 - 2*x^6) / ((1 - x)^3*(1 + x)) + O(x^50)) \\ Colin Barker, Jan 25 2018
CROSSREFS
Cf. A298031.
Sequence in context: A055831 A346823 A037984 * A073361 A155013 A134887
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 21 2018
STATUS
approved