OFFSET
0,3
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
From Vincenzo Librandi, Sep 27 2011: (Start)
a(n) = 5*n^2 + 2*(-1)^n-2;
a(n) = -a(n-1) + 10*n^2 - 10*n + 1. (End)
G.f.: x*(1+18*x+x^2)/((1+x)*(1-x)^3). - Bruno Berselli, Sep 27 2011
Sum_{n>=1} 1/a(n) = Pi^2/120 + tan(Pi/sqrt(5))*Pi/(8*sqrt(5)). - Amiram Eldar, Jan 17 2023
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {0, 1, 20, 41}, 50] (* Harvey P. Dale, Apr 08 2016 *)
PROG
(Magma) [5*n^2+2*(-1)^n-2: n in [0..50]]; // Vincenzo Librandi, Sep 27 2011
(PARI) a(n)=5*n^2+2*(-1)^n-2 \\ Charles R Greathouse IV, Sep 28 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 17 2011
STATUS
approved