A135522 a(n) = 2*a(n-1) + 3*a(n-2), with a(0) = 2 and a(1) = 3.
2, 3, 12, 33, 102, 303, 912, 2733, 8202, 24603, 73812, 221433, 664302, 1992903, 5978712, 17936133, 53808402, 161425203, 484275612, 1452826833, 4358480502, 13075441503, 39226324512, 117678973533, 353036920602, 1059110761803
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,3).
Crossrefs
Cf. A060925.
Programs
-
Magma
[(5*3^n+3*(-1)^n)/4: n in [0..40]]; // Vincenzo Librandi, Jun 02 2011
-
Mathematica
f[n_]:=3/(n+2);x=2;Table[x=f[x];Numerator[x],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 11 2010 *) Transpose[NestList[Join[Rest[#],ListCorrelate[{3,2},#]]&, {2,3},30]][[1]] (* Harvey P. Dale, Mar 14 2011 *) CoefficientList[Series[(x-2)/(3x^2+2x-1),{x,0,30}],x] (* Harvey P. Dale, Mar 14 2011 *)
-
PARI
a(n)=(5*3^n+3*(-1)^n)/4 \\ Charles R Greathouse IV, Jun 01 2011
Formula
From R. J. Mathar, Feb 23 2008: (Start)
O.g.f.: (5/(1-3*x) + 3/(1+x))/4.
a(n) = (5*3^n + 3*(-1)^n)/4. (End)
G.f.: (x-2)/(3*x^2 + 2*x - 1). - Harvey P. Dale, Mar 14 2011
E.g.f.: (1/4)*(5*exp(3*x) + 3*exp(-x)). - G. C. Greubel, Oct 17 2016
Extensions
More terms from R. J. Mathar, Feb 23 2008
Comments