OFFSET
0,3
LINKS
Iain Fox, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
a(n) = (1/8) {4n^2 + 2n - 3 + (-1)^n - 2(-1)^[(n-1)/2] }. - Ralf Stephan, Jun 10 2005
a(n) = 2*a(n-1)-a(n-2)+a(n-4)-2*a(n-5)+a(n-6) with a(0)=0, a(1)=0, a(2)=2, a(3)=5, a(4)=9, a(5)=13. - Harvey P. Dale, Dec 27 2015
a(n) = floor(n*(1+2*n)/4). - Harvey P. Dale, Dec 27 2015
From Iain Fox, Dec 21 2017: (Start)
a(n) = (-3 + (-1)^n + 2*i^(n*(1 + n)) + 2*n + 4*n^2)/8, where i is the imaginary unit.
G.f.: x^2*(2 + x + x^2)/((1 - x)^3*(1 + x)*(1 + x^2)).
(End)
MATHEMATICA
Table[Floor[(n(1+2n))/4], {n, 0, 50}] (* or *) LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 0, 2, 5, 9, 13}, 51] (* Harvey P. Dale, Dec 27 2015 *)
PROG
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 02 2000
STATUS
approved