OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-2,2,3,-2).
FORMULA
G.f.: (1 + 3*x - 3*x^3) / (1 + 2*x - 2*x^2 - 3*x^3 + 2*x^4).
2^n = Sum_{k=0..2*n} A027907(n, k)*a(k).
3^n = Sum_{k=0..2*n} A027907(n, k)*a(k+1).
a(n) = (1/3)*((-1)^n*(3*Fibonacci(n-1) - 2^n) + 1). - Ralf Stephan, May 15 2007
EXAMPLE
2^3 = 1*(1) + 3*(1) + 6*(0) + 7*(2) + 6*(-3) + 3*(8) + 1*(-16).
3^3 = 1*(1) + 3*(0) + 6*(2) + 7*(-3) + 6*(8) + 3*(-16) + 1*(35).
MATHEMATICA
LinearRecurrence[{-2, 2, 3, -2}, {1, 1, 0, 2}, 41] (* G. C. Greubel, Feb 01 2023 *)
PROG
(PARI) a(n)=polcoeff((1+3*x-3*x^3)/(1+2*x-2*x^2-3*x^3+2*x^4+x*O(x^n)), n)
(Magma) [((-1)^n*(3*Fibonacci(n-1) -2^n) +1)/3: n in [0..40]]; // G. C. Greubel, Feb 01 2023
(SageMath)
def A100321(n): return ((-1)^n*(3*fibonacci(n-1) -2^n) +1)/3
[A100321(n) for n in range(41)] # G. C. Greubel, Feb 01 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Nov 15 2004
STATUS
approved