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.
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
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- A. W. Vyawahare and K. M. Purohit, Near pseudo Smarandache function, Smarandache Notions, 14 (2004), 42-61.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Maple
seq(n*(1+ceil(n/2)), n=0..53); # Zerinvary Lajos and Klaus Brockhaus, Apr 10 2007
-
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 *) LinearRecurrence[{1,2,-2,-1,1},{0,2,4,9,12},60] (* Harvey P. Dale, Sep 21 2024 *)
-
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
Formula
a(0) = 0, a(2n) = a(2n-1) + n, a(2n-1) = a(2n-2) + 3n-1. - Amarnath Murthy, Jul 04 2004
From Colin Barker, Feb 03 2019: (Start)
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)