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.

A057587 Nonnegative numbers of form n*(n^2+-1)/2.

Original entry on oeis.org

0, 1, 3, 5, 12, 15, 30, 34, 60, 65, 105, 111, 168, 175, 252, 260, 360, 369, 495, 505, 660, 671, 858, 870, 1092, 1105, 1365, 1379, 1680, 1695, 2040, 2056, 2448, 2465, 2907, 2925, 3420, 3439, 3990, 4010, 4620, 4641, 5313, 5335, 6072, 6095, 6900, 6924, 7800
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2000

Keywords

Comments

Taking alternate terms gives A027480 and A006003. - Jeremy Gardiner, Apr 10 2005

Crossrefs

Programs

  • Magma
    [(2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32 : n in [0..50]]; // Wesley Ivan Hurt, Mar 27 2015
  • Maple
    A057587:=n->(2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32: seq(A057587(n), n=0..50); # Wesley Ivan Hurt, Mar 27 2015
  • Mathematica
    CoefficientList[Series[x*(1 + 2 x - x^2 + x^3)/((x - 1)^4*(x + 1)^3), {x, 0, 50}], x] (* Wesley Ivan Hurt, Mar 27 2015 *)
    Table[(2 n^3 + 9 n^2 + 15 n + 5 + (3 n^2 + n - 5) (-1)^n) / 32, {n, 0, 50}] (* Vincenzo Librandi, Mar 28 2015 *)
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,1,3,5,12,15,30},50] (* Harvey P. Dale, Nov 29 2022 *)
  • PARI
    concat(0, Vec(x*(x^3-x^2+2*x+1)/((x-1)^4*(x+1)^3) + O(x^100))) \\ Colin Barker, Nov 18 2014
    

Formula

a(n) = (2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32. - Luce ETIENNE, Nov 18 2014
From Wesley Ivan Hurt, Mar 27 2015: (Start)
G.f.: x*(1 + 2 x - x^2 + x^3)/((x - 1)^4*(x + 1)^3).
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7). (End)
a(2*n+1) + a(2*n) = (a(2*n+1) - a(2*n))^3. - Greg Dresden, Feb 10 2022
a(2*n+1)^2 - a(2*n)^2 = (n+1)^4. - Adam Michael Bere, Feb 15 2024