OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
a(n) = [x^n] (-x*(2+4*x+4*x^2+3*x^3+3*x^4)/((x+1)*(x^2+1)*(x-1)^3)).
a(n) = n! [x^n] (3*exp(x)-exp(-x)+14*exp(x)*x+16*exp(x)*x^2-2*cos(x)-2*sin(x))/8.
a(n) = a(n-6) - 2*a(n-5) + a(n-4) - a(n-2) + 2*a(n-1) for n >= 6.
(-1)^n*(a(n+3) - 3*a(n+2) + 3*a(n+1) - a(n)) = sqrt(n^2 mod 8) = A007877(n).
MAPLE
a := n -> 2*n^2 - floor(n/4): seq(a(n), n=0..48);
MATHEMATICA
LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 2, 8, 18, 31, 49}, 49]
Table[2n^2-Floor[n/4], {n, 0, 60}] (* Harvey P. Dale, Jan 08 2022 *)
PROG
(PARI) a(n) = 2*n^2-n\4; \\ Altug Alkan, Oct 08 2017
(Python)
def A293296(n): return (n**2<<1)-(n>>2) # Chai Wah Wu, Jan 26 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Oct 08 2017
STATUS
approved