OFFSET
1,2
COMMENTS
The leading diagonal is given by A080956(n) = ((n+1)(2-n)/2).
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = (n+floor(n/2)+1)*(n-floor(n/2))/2-binomial(ceiling(n/2)+1, ceiling(n/2)-2). - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 20 2004
G.f.: x*(1 + x - x^2 - x^3 - x^4) / ((1 - x)^4*(1 + x)^3). - Colin Barker, Dec 18 2012
From Colin Barker, Nov 12 2017: (Start)
a(n) = (1/96)*(-2*n^3 + 36*n^2 + 32*n) for n even.
a(n) = (1/96)*(-2*n^3 + 30*n^2 + 50*n + 18) for n odd.
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) for n>7.
(End)
EXAMPLE
a(7) = 7+5+2+(-2) = 12.
MAPLE
seq((n+floor(n/2)+1)*(n-floor(n/2))/2-binomial(ceil(n/2)+1, ceil(n/2)-2), n=1..60); # C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 20 2004
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 2, 4, 6, 8, 11, 12}, 60] (* Harvey P. Dale, Jan 17 2022 *)
PROG
(PARI) Vec(x*(1 + x - x^2 - x^3 - x^4) / ((1 - x)^4*(1 + x)^3) + O(x^60)) \\ Colin Barker, Nov 12 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Amarnath Murthy, Mar 25 2003
EXTENSIONS
More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 20 2004
STATUS
approved