OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..600
Index entries for linear recurrences with constant coefficients, signature (20,210,-540,-729).
FORMULA
G.f.: x*(1 + 105*x - 513*x^2 - 729*x^3) / ((1 + x)*(1 - 3*x)*(1 + 9*x)*(1 - 27*x)). - R. J. Mathar, Sep 09 2008
a(n) = ((-1)^n + 3^(1+n) + (-1)^n*3^(1+2*n) + 27^n) / 8 for n>0. - Colin Barker, Dec 23 2017
EXAMPLE
a(3) = 2197 = 13^3 = (A046717(a))^3.
MATHEMATICA
Rest@ Nest[Append[#, 2 #[[-1]] + 3 #[[-2]]] &, {1, 1}, 15]^3 (* or *)
Rest@ CoefficientList[Series[x (1 + 105 x - 513 x^2 - 729 x^3)/((1 + 9 x) (1 - 3 x) (1 - 27 x) (1 + x)), {x, 0, 16}], x] (* Michael De Vlieger, Dec 22 2017 *)
PROG
(PARI) Vec(x*(1 + 105*x - 513*x^2 - 729*x^3) / ((1 + x)*(1 - 3*x)*(1 + 9*x)*(1 - 27*x)) + O(x^40)) \\ Colin Barker, Dec 23 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 09 2006
EXTENSIONS
Entry revised by N. J. A. Sloane, Aug 11 2019
STATUS
approved