OFFSET
0,4
LINKS
Vincenzo Librandi, 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/16)*(2n^2 + 9 - 5(-1)^n - 2(-1)^floor(n/2) + 2(-1)^floor((n-1)/2)). - Ralf Stephan, Jun 10 2005
G.f.: -x*(1-x-x^3+x^2+x^4) / ( (1+x)*(1+x^2)*(x-1)^3 ). - R. J. Mathar, Jan 22 2011
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6); a(0)=0, a(1)=1, a(2)=1, a(3)=2, a(4)=2, a(5)=4. - Harvey P. Dale, Jun 21 2011
MAPLE
MATHEMATICA
Ceiling[Range[0, 60]^2/8] (* or *) LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 1, 1, 2, 2, 4}, 60] (* Harvey P. Dale, Jun 21 2011 *)
PROG
(Magma) [Ceiling(n^2/8):n in [0..60]]; // Vincenzo Librandi, Oct 21 2011
(PARI) a(n)=ceil(n^2/8) \\ Charles R Greathouse IV, Feb 14 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved