OFFSET
0,1
COMMENTS
a(n) = a(n-1) + 9 for n >= 5. Generalization: If a(n,k) = sum of natural numbers m such that n - k <= m <= n + k (k >= 1) then a(n,k) = (k + n)*(k + n + 1)/2 = A000217(k+n) for 0 <= n <= k, a(n,k) = a(n-1,k) +2k + 1 = ((k + n - 1)*(k + n)/2) + 2k + 1 = A000217(k+n-1) +2k +1 for n >= k + 1 (see, e.g., A008486). a(n) = (4 + n)*(5 + n)/2 = A000217(4+n) for 0 <= n <= 4, a(n) = a(n-1) + 9 for n >= 5.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2, -1).
FORMULA
G.f.: (10 - 15*x + 6*x^2 - x^6)/(1 - x)^3. - G. C. Greubel, Jul 12 2016
MATHEMATICA
CoefficientList[Series[(10 - 15*x + 6*x^2 - x^6)/(1 - x)^3, {x, 0, 25}], x] (* G. C. Greubel, Jul 12 2016 *)
LinearRecurrence[{2, -1}, {10, 15, 21, 28, 36, 45}, 60] (* Harvey P. Dale, Dec 10 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Nov 18 2009
STATUS
approved