login
A115113
a(n) = 3*a(n-1) + 4*a(n-2), with a(0) = 2, a(1) = 6, a(2) = 10.
3
2, 6, 10, 54, 202, 822, 3274, 13110, 52426, 209718, 838858, 3355446, 13421770, 53687094, 214748362, 858993462, 3435973834, 13743895350, 54975581386, 219902325558, 879609302218, 3518437208886, 14073748835530, 56294995342134, 225179981368522, 900719925474102
OFFSET
0,1
FORMULA
From Colin Barker, Nov 13 2012: (Start)
a(n) = (-2*(7*(-1)^n - 2^(1 + 2*n)))/5 for n > 0.
a(n) = 3*a(n-1) + 4*a(n-2) for n > 2.
G.f.: 2*(8*x^2 - 1)/((x + 1)*(4*x - 1)). (End)
E.g.f.: (20 - 14*exp(-x) + 4*exp(4*x))/5. - Franck Maminirina Ramaharo, Nov 23 2018
MATHEMATICA
Join[{2}, LinearRecurrence[{3, 4}, {6, 10}, 50]]
PROG
(Maxima) (a[0] : 2, a[1] : 6, a[2] : 10, a[n] := 3*a[n-1] + 4*a[n-2], makelist(a[n], n, 0, 50)); /* Franck Maminirina Ramaharo, Nov 23 2018 */
(PARI) x='x+O('x^50); Vec(2*(8*x^2-1)/((x+1)*(4*x-1))) \\ G. C. Greubel, Nov 23 2018
(Magma) I:=[6, 10]; [2] cat [n le 2 select I[n] else 3*Self(n-1) + 4*Self(n-2): n in [1..49]]; // G. C. Greubel, Nov 23 2018
(Sage) s=(2*(8*x^2-1)/((x+1)*(4*x-1))).series(x, 50); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 23 2018
CROSSREFS
Sequence in context: A083524 A222559 A095107 * A163788 A361792 A324547
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Mar 06 2006
EXTENSIONS
Edited, and new name from Franck Maminirina Ramaharo, Nov 23 2018, after Colin Barker's formula
STATUS
approved