OFFSET
0,3
COMMENTS
Conjecture: for n > 0, a(n-1) is equal to the determinant of an n X n symmetric Toeplitz matrix M(n) whose first row consists of a single zero followed by successive positive integers repeated (A004526). - Stefano Spezia, Jan 10 2020
LINKS
William A. Tedeschi, Table of n, a(n) for n = 0..10000
Wikipedia, Toeplitz Matrix
Index entries for linear recurrences with constant coefficients, signature (-2,0,2,1).
FORMULA
a(n) = Sum_{i=0..n} (-1)^i*t(i) where t(i) = i*(i+1)/2.
From R. J. Mathar, Feb 09 2010: (Start)
a(n) = -2*a(n-1) + 2*a(n-3) + a(n-4) for n > 3.
G.f.: x/((x-1)*(1+x)^3). (End)
a(n) = (-1)^n * ((n^2+n)/2 - floor(n^2/4)). - William A. Tedeschi, Aug 24 2010
E.g.f.: (1/4)*((x - 3)*x*cosh(x) - (x^2 - 3*x + 1)*sinh(x)). - Stefano Spezia, Jan 11 2020
Negative of the Euler transform of length 2 sequence [-2, 3]. - Michael Somos, Apr 27 2020
EXAMPLE
a(4) = t(0) - t(1) + t(2) - t(3) + t(4) = 0 - 1 + 3 - 6 + 10 = 6.
G.f. = - x + 2*x^2 - 4*x^3 + 6*x^4 - 9*x^5 + 12*x^6 - 16*x^7 + ... - Michael Somos, Apr 27 2020
MATHEMATICA
LinearRecurrence[{-2, 0, 2, 1}, {0, -1, 2, -4}, 60] (* Harvey P. Dale, Mar 16 2016 *)
PROG
(PARI) t(n)=n*(n+1)/2;
for (n=0, 30, print1(sum(i=0, n, (-1)^i*t(i)), ", "))
(Magma) [(-1)^n*((n^2+n)/2 - Floor(n^2/4)): n in [0..50]]; // G. C. Greubel, Oct 29 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Jon Perry, Jun 11 2003
EXTENSIONS
More terms from David W. Wilson, Jun 14 2003
STATUS
approved