login
A168105
a(n) = sum of natural numbers m such that n - 6 <= m <= n + 6.
1
21, 28, 36, 45, 55, 66, 78, 91, 104, 117, 130, 143, 156, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, 650, 663, 676, 689, 702, 715, 728, 741
OFFSET
0,1
COMMENTS
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).
FORMULA
a(n) = (6 + n)*(7 + n)/2 = A000217(6+n) for 0 <= n <= 6, a(n) = a(n-1) + 13 for n >= 7.
G.f.: (21 - 35*x + 15*x^2 - x^8)/(1 - x)^3. - G. C. Greubel, Jul 13 2016
MATHEMATICA
CoefficientList[Series[(21 - 35*x + 15*x^2 - x^8)/(1 - x)^3, {x, 0, 50}], x] (* G. C. Greubel, Jul 13 2016 *)
PROG
(PARI) a(n)=if(n>5, 13*n, n*(n+13)/2+21) \\ Charles R Greathouse IV, Jul 13 2016
CROSSREFS
Sequence in context: A120735 A009727 A337702 * A227936 A048012 A254368
KEYWORD
nonn,easy
AUTHOR
Jaroslav Krizek, Nov 18 2009
STATUS
approved