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.

A129889 Write down n, then n*(n+1).

Original entry on oeis.org

0, 0, 1, 2, 2, 6, 3, 12, 4, 20, 5, 30, 6, 42, 7, 56, 8, 72, 9, 90, 10, 110, 11, 132, 12, 156, 13, 182, 14, 210, 15, 240, 16, 272, 17, 306, 18, 342, 19, 380, 20, 420, 21, 462, 22, 506, 23, 552, 24, 600, 25, 650, 26, 702, 27, 756, 28, 812, 29, 870, 30, 930, 31, 992, 32, 1056, 33
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2007

Keywords

Crossrefs

Cf. A124625.

Programs

  • Magma
    [IsEven(n) select n/2 else (n^2-1)/4: n in [0..66]]; // Bruno Berselli, May 06 2011
  • Maple
    f:=n-> if n mod 2 = 0 then n/2 else (n^2-1)/4; fi;
  • Mathematica
    Flatten[Table[{n,n(n+1)},{n,0,40}]] (* Harvey P. Dale, Jun 21 2015 *)

Formula

From Bruno Berselli, May 06 2011: (Start)
G.f.: x^2*(1+2*x-x^2)/(1-x^2)^3.
a(n) = ((1+2*n-n^2)*(-1)^n -(1-2*n-n^2))/8.
a(n) = a(n-2) + A124625(n) for n>1. (End)