A099842 Expansion of (1-x)/(1 + 6*x - 3*x^2).
1, -7, 45, -291, 1881, -12159, 78597, -508059, 3284145, -21229047, 137226717, -887047443, 5733964809, -37064931183, 239591481525, -1548743682699, 10011236540769, -64713650292711, 418315611378573, -2704034619149571, 17479154549033145, -112987031151647583
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-6,3).
Programs
-
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
-
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 *)
-
SageMath
A099842 = BinaryRecurrenceSequence(-6,3,1,-7) [A099842(n) for n in range(31)] # G. C. Greubel, Oct 10 2022
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.
Comments