OFFSET
1,2
COMMENTS
Also a(n) = n^2 + 9*n + 9 if the offset is changed to -1. - R. J. Mathar, May 18 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(-1 - 6*x + 5*x^2) / (x-1)^3. - R. J. Mathar, May 18 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(1)=1, a(2)=9, a(3)=19. - Harvey P. Dale, May 28 2015
Sum_{n>=1} 1/a(n) = 199/495 + Pi*tan(3*sqrt(5)*Pi/2)/(3*sqrt(5)). - Amiram Eldar, Jan 18 2021
MATHEMATICA
k = 5; Table[n^2 + k*n - k, {n, 100}]
LinearRecurrence[{3, -3, 1}, {1, 9, 19}, 50] (* Harvey P. Dale, May 28 2015 *)
PROG
(Magma) [n^2+5*n-5: n in [1..50]]; // Vincenzo Librandi, Sep 30 2011
(PARI) a(n)=n^2+5*n-5 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, May 12 2011
STATUS
approved