A298032 Partial sums of A298031.
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
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Crossrefs
Cf. A298031.
Programs
-
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
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)
Comments