OFFSET
1,1
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(-21 - 24*x + x^2)/(x-1)^3.
From Amiram Eldar, Mar 06 2023: (Start)
Sum_{n>=1} 1/a(n) = (1 - cot(Pi/sqrt(22))*Pi/sqrt(22))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/sqrt(22))*Pi/sqrt(22) - 1)/2. (End)
MATHEMATICA
22Range[40]^2-1 (* or *) LinearRecurrence[{3, -3, 1}, {21, 87, 197}, 40]
PROG
(Magma) I:=[21, 87, 197]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 14 2012
(PARI) for(n=1, 40, print1(22*n^2 - 1", ")); \\ Vincenzo Librandi, Feb 14 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 21 2009
EXTENSIONS
Comment rewritten by R. J. Mathar, Oct 16 2009
STATUS
approved