login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A057587
Nonnegative numbers of form n*(n^2+-1)/2.
4
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,3
COMMENTS
Taking alternate terms gives A027480 and A006003. - Jeremy Gardiner, Apr 10 2005
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
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 *)
PROG
(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
(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
CROSSREFS
Sequence in context: A260818 A151866 A269928 * A213036 A032438 A025083
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Oct 05 2000
STATUS
approved