OFFSET
0,2
COMMENTS
A transformation of x/(1-2*x-2*x^2).
The g.f. is the transform of the g.f. of A002605 under the mapping G(x) -> (-1/(1+x))*G((x-1)/(x+1)). In general this mapping transforms x/(1-k*x-k*x^2) into (1-x)/(1+2*(k+1)*x-(2*k-1)*x^2).
For n >= 1, |a(n)| equals the numbers of words of length n-1 on alphabet {0,1,...,6} containing no subwords 00, 11, 22, 33. - Milan Janjic, Jan 31 2015
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-6,3).
FORMULA
G.f.: (1-x)/(1+6*x-3*x^2).
a(n) = (1/2 - sqrt(3)/3)*(-3 + 2*sqrt(3))^n + (1/2 + sqrt(3)/3)*(-3 - 2*sqrt(3))^n.
a(n) = (-1)^n*Sum_{k=0..n} binomial(n, k)(-1)^(n-k)*A002605(2k+2)/2.
MATHEMATICA
LinearRecurrence[{-6, 3}, {1, -7}, 31] (* G. C. Greubel, Oct 10 2022 *)
CoefficientList[Series[(1-x)/(1+6x-3x^2), {x, 0, 40}], x] (* Harvey P. Dale, Aug 31 2024 *)
PROG
(Magma) [n le 2 select (-7)^(n-1) else -6*Self(n-1) +3*Self(n-2): n in [1..31]]; // G. C. Greubel, Oct 10 2022
(SageMath)
A099842 = BinaryRecurrenceSequence(-6, 3, 1, -7)
[A099842(n) for n in range(31)] # G. C. Greubel, Oct 10 2022
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Oct 27 2004
STATUS
approved