|
|
A168102
|
|
a(n) = sum of natural numbers m such that n - 3 <= m <= n + 3.
|
|
1
|
|
|
6, 10, 15, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, 364, 371, 378
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
a(n) = a(n-1) + 7 for n >= 4. 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) = (3 + n)*(4 + n)/2 = A000217(3+n) for 0 <= n <= 3, a(n) = a(n-1) + 7 for n >= 4.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + 7 for n >= 4.
a(n) = 2*a(n-1) - a(n-2) for n>4. - Colin Barker, Feb 12 2015
G.f.: (6-2*x+x^2+x^3+x^4) / (1-x)^2. - Colin Barker, Feb 12 2015
|
|
MATHEMATICA
|
Join[{6, 10, 15}, NestList[#+7&, 21, 60]] (* Harvey P. Dale, May 07 2022 *)
|
|
PROG
|
(PARI) Vec((x^4+x^3+x^2-2*x+6)/(x-1)^2 + O(x^60)) \\ Colin Barker, Feb 12 2015
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (6-2*x+x^2+x^3+x^4)/(1-x)^2 )); // G. C. Greubel, Apr 03 2019
(Sage) ((6-2*x+x^2+x^3+x^4)/(1-x)^2).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019
(GAP) a:=[21, 28];; for n in [3..60] do a[n]:=2*a[n-1]-a[n-2]; od; Concatenation([6, 10, 15], a); # G. C. Greubel, Apr 03 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|