login
A120664
Expansion of 2*x*(1-6*x+12*x^2)/(1-8*x+19*x^2-12*x^3).
1
0, 2, 4, 18, 92, 442, 2004, 8738, 37132, 155082, 640004, 2619058, 10653372, 43144922, 174174004, 701478978, 2820264812, 11324105962, 45425564004, 182089676498, 729520967452, 2921570654202, 11696742970004, 46818352939618
OFFSET
0,2
FORMULA
From Colin Barker, Aug 02 2012: (Start)
a(n) = 8*a(n-1) - 19*a(n-2) + 12*a(n-3) for n > 3.
G.f.: 2*x*(1-6*x+12*x^2)/(1-8*x+19*x^2-12*x^3). (End)
MATHEMATICA
LinearRecurrence[{8, -19, 12}, {0, 2, 4, 18}, 31] (* G. C. Greubel, Dec 26 2022 *)
PROG
(Magma) I:=[2, 4, 18]; [0] cat [n le 3 select I[n] else 8*Self(n-1) -19*Self(n-2) +12*Self(n-3): n in [1..31]]; // G. C. Greubel, Dec 26 2022
(SageMath)
@CachedFunction
def a(n): # a = A120664
if (n<4): return (0, 2, 4, 18)[n]
else: return 8*a(n-1) -19*a(n-2) +12*a(n-3)
[a(n) for n in range(41)] # G. C. Greubel, Dec 26 2022
CROSSREFS
Sequence in context: A075836 A295370 A292280 * A095816 A020101 A370524
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Aug 11 2006
EXTENSIONS
Edited by N. J. A. Sloane, Jul 13 2007
New name from Colin Barker, Aug 02 2012
STATUS
approved