OFFSET
0,3
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = 21*n^2/4 + 17*((-1)^n-1)/8.
From Colin Barker, Sep 16 2012: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: x*(1+19*x+x^2)/((1-x)^3*(1+x)). (End)
Sum_{n>=1} 1/a(n) = Pi^2/126 + tan(sqrt(17/21)*Pi/2)*Pi/sqrt(357). - Amiram Eldar, Jan 17 2023
MAPLE
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {0, 1, 21, 43}, 50] (* Amiram Eldar, Jan 17 2023 *)
PROG
(PARI) a(n)=21*n^2/4+17*((-1)^n-1)/8 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 27 2011
STATUS
approved