OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: (-2 - x + 2*x^2)/(x - 1)^3. - R. J. Mathar, Mar 23 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Feb 26 2012
Sum_{n>=0} 1/a(n) = 271/280 + 2*Pi*tan(sqrt(65)*Pi/2)/sqrt(65). - Amiram Eldar, Dec 13 2022
E.g.f.: exp(x)*(2 + 5*x + x^2/2). - Elmo R. Oliveira, Oct 21 2024
MATHEMATICA
Table[(n^2 + 9 n + 4)/2, {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 12 2011 *)
LinearRecurrence[{3, -3, 1}, {2, 7, 13}, 60] (* Harvey P. Dale, Aug 11 2014 *)
PROG
(Magma) I:=[2, 7, 13]; [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 26 2012
(PARI) for(n=0, 60, print1((n^2+9*n+4)/2", ")); \\ Vincenzo Librandi, Feb 26 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 22 2009
EXTENSIONS
Edited by Jon E. Schoenfield, Jun 23 2010
a(0)=2 from Vincenzo Librandi, Mar 22 2011
STATUS
approved