login
A123012
Expansion of 1/(1 - 2*x - 21*x^2).
0
1, 2, 25, 92, 709, 3350, 21589, 113528, 680425, 3744938, 21778801, 122201300, 701757421, 3969742142, 22676390125, 128717365232, 733638923089, 4170342516050, 23747102416969, 135071397670988, 768831946098325, 4374163243287398, 24893797354639621, 141645022818314600
OFFSET
0,2
FORMULA
a(0)=1, a(1)=2, a(n) = 2*a(n-1) + 21*a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
a(n) = (1/2 + sqrt(22)/44)*(1 + sqrt(22))^n + (1/2 - sqrt(22)/44)*(1 - sqrt(22))^n. - Antonio Alberto Olivares, Jun 08 2011
MAPLE
A:= gfun:-rectoproc({a(n)=2*a(n-1)+21*a(n-2), a(0)=1, a(1)=2}, a(n), remember):
map(A, [$0..30]); # Robert Israel, Jan 28 2015
MATHEMATICA
l = 2; m = 7; k = 3; p[x_] := -k/m - l*x/m + x^2 q[x_] := ExpandAll[x^2*p[1/x]] Table[ SeriesCoefficient[Series[x/q[x], {x, 0, 30}], n]*m^(n - 1), {n, 0, 30}] f[n_Integer] = Module[{a}, a[n] /. RSolve[{a[n] == l*a[n - 1]/m + k*a[n - 2]/m, a[0] == 0, a[1] == 1}, a[n], n][[1]] // FullSimplify] a = Table[Rationalize[N[f[n]*m^(n - 1), 100], 0], {n, 0, 25}]
Join[{a=1, b=2}, Table[c=2*b+21*a; a=b; b=c, {n, 60}]] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2011 *)
PROG
(PARI) Vec(1/(1-2*x-21*x^2) + O(x^30)) \\ Michel Marcus, Jan 28 2015
CROSSREFS
Cf. A002532.
Sequence in context: A069232 A269232 A181920 * A175522 A226418 A196011
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 23 2006
EXTENSIONS
Edited by N. J. A. Sloane, Sep 26 2006
STATUS
approved