|
|
A092530
|
|
a(0) = 0; for n > 0, a(n) = T(n) + k where T(n) is the n-th triangular number (A000217) and k (see A026741) is the smallest positive number such that a(n) is divisible by n.
|
|
2
|
|
|
0, 2, 4, 9, 12, 20, 24, 35, 40, 54, 60, 77, 84, 104, 112, 135, 144, 170, 180, 209, 220, 252, 264, 299, 312, 350, 364, 405, 420, 464, 480, 527, 544, 594, 612, 665, 684, 740, 760, 819, 840, 902, 924, 989, 1012, 1080, 1104, 1175, 1200, 1274, 1300, 1377, 1404, 1484
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(0) = 0, a(2n) = a(2n-1) + n, a(2n-1) = a(2n-2) + 3n-1. - Amarnath Murthy, Jul 04 2004
G.f.: x*(2 + 2*x + x^2 - x^3) / ((1 - x)^3*(1 + x)^2).
a(n) = (n*(2 + n)) / 2 for n even.
a(n) = (n*(3 + n)) / 2 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
(End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
{0}~Join~Array[Block[{k = 1}, While[GCD[#1, #2 + k] < #1, k++]; #2 + k] & @@ {#, (#^2 + #)/2} &, 53] (* or *)
CoefficientList[Series[x (2 + 2 x + x^2 - x^3)/((1 - x)^3*(1 + x)^2), {x, 0, 53}], x] (* Michael De Vlieger, Feb 03 2019 *)
|
|
PROG
|
(PARI) for(n=0, 53, print1(n*(1+ceil(n/2)), ", ")); // Klaus Brockhaus, Apr 10 2007
(PARI) concat(0, Vec(x*(2 + 2*x + x^2 - x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Feb 03 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|