OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = a(n-1) + 9*n with n > 1, a(1)=1.
From Vincenzo Librandi, Mar 15 2012: (Start)
G.f.: x*(1+16*x-8*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
E.g.f.: (1/2)*(9*x^2 + 18*x - 16)*exp(x). - G. C. Greubel, May 01 2016
Sum_{n>=1} 1/a(n) = 1/8 + (2*Pi/(3*sqrt(73)))*tan(sqrt(73)*Pi/6). - Amiram Eldar, Feb 20 2023
MATHEMATICA
CoefficientList[Series[(1+16x-8x^2)/(1-x)^3, {x, 0, 50}], x] (* or *) LinearRecurrence[{3, -3, 1}, {1, 19, 46}, 50] (* Vincenzo Librandi, Mar 15 2012 *)
PROG
(PARI) a(n)=9*binomial(n+1, 2)-8 \\ Charles R Greathouse IV, Jan 11 2012
(Magma) I:=[1, 19, 46]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Mar 15 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Oct 08 2009
EXTENSIONS
New name from Charles R Greathouse IV, Jan 11 2012
STATUS
approved