cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 08 2004

Keywords

Crossrefs

Equals A000217 + A026741.

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)