OFFSET
1,1
LINKS
G. C. Greubel, 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
From Vladeta Jovovic, Jan 01 2003: (Start)
a(n) = (1/48)*(4*n^3 + (3*(-1)^(n+1) + 39)*n^2 + (18*(-1)^(n+1) + 74)*n + 27*(-1)^(n+1) + 27).
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).
G.f.: x*(4 + 2*x - x^2 - x^3)/((1+x)^3*(1-x)^4). (End)
a(n) = Sum_{i=1..ceiling(n/2)} (i+1)*(n-i+2) = ceiling(n/2)*(-2*ceiling(n/2)^2 + 3n*ceiling(n/2) + 9*n + 14)/6. - Wesley Ivan Hurt, Sep 20 2013
E.g.f.: (1/24)*( x*(69 + 24*x + 2*x^2)*cosh(x) + (27 + 48*x + 27*x^2 + 2*x^3)*sinh(x) ). - G. C. Greubel, Jul 12 2022
MAPLE
seq(sum((i+1)*(k-i+2), i=1..ceil(k/2)), k=1..70); # Wesley Ivan Hurt, Sep 20 2013
MATHEMATICA
Table[Ceiling[n/2]*(-2*Ceiling[n/2]^2+3n*Ceiling[n/2]+9n+14)/6, {n, 100}] (* Wesley Ivan Hurt, Sep 20 2013 *)
PROG
(Magma)
b:= func< n | (1-(-1)^n)/2 >;
[(2*n^3 + 3*(6 +b(n))*n^2 + 2*(14 +9*b(n))*n + 27*b(n))/24 : n in [1..50]] // G. C. Greubel, Jul 12 2022
(SageMath)
def b(n): return (1-(-1)^n)/2
[(2*n^3 + 3*(6 +b(n))*n^2 + 2*(14 +9*b(n))*n + 27*b(n))/24 for n in (1..50)] # G. C. Greubel, Jul 12 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name simplified by Jon E. Schoenfield, Jun 12 2019
STATUS
approved