OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,2,-1).
FORMULA
G.f.: (1 + x)^2*(1 + x^2) / (1 - 2*x - 2*x^3 + x^4).
a(n) = 2*a(n-1) + 2*a(n-3) - a(n-4) for n>4. - Colin Barker, Feb 04 2018
MATHEMATICA
LinearRecurrence[{2, 0, 2, -1}, {1, 4, 10, 24, 56}, 40] (* Harvey P. Dale, Jan 02 2020 *)
PROG
(Magma)
R<x> := RationalFunctionField(Integers());
PSR25 := PowerSeriesRing(Integers():Precision := 25);
FG<S, T> := FreeGroup(2);
TG := quo<FG | S^4, T^4, (S*T)^4 >;
f, A :=IsAutomaticGroup(TG);
gf := GrowthFunction(A);
R!gf;
Coefficients(PSR25!gf);
(PARI) Vec((1 + x)^2*(1 + x^2) / (1 - 2*x - 2*x^3 + x^4) + O(x^40)) \\ Colin Barker, Feb 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
John Cannon and N. J. A. Sloane, Feb 04 2018
STATUS
approved