OFFSET
0,6
COMMENTS
Reflected tetranacci numbers (see 1st formula).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Kai Wang, Identities, generating functions and Binet formula for generalized k-nacci sequences, 2020.
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,1).
FORMULA
a(n) = A000078(-n).
Let Q(n) = A000078, then a(n) = (-1)^(n+1)*(Q(n)^3 - 2*Q(n-1)*Q(n) *Q(n+1) + Q(n-2)*Q(n+1)^2 + Q(n-1)^2*Q(n+2) - Qn(-2)*Q(n)*Q(n+2)) derived from powers of the inverse of a generalized Fibonacci matrix.
G.f.: x/(1+x+x^2+x^3-x^4).
G.f. of absolute values: x/(1-x+x^2-x^3-x^4). - Vaclav Kotesovec, Oct 18 2013
a(n) = term (1,4) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,1; 1,0,0,0]^(-n). - Alois P. Heinz, Jun 12 2008
MAPLE
a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^(-n))[1, 4]:
seq(a(n), n=0..50); # Alois P. Heinz, Jun 12 2008
MATHEMATICA
CoefficientList[Series[x/(1+x+x^2+x^3-x^4), {x, 0, 50}], x]
LinearRecurrence[{-1, -1, -1, 1}, {0, 1, -1, 0}, 60] (* Harvey P. Dale, May 20 2018 *)
PROG
(Magma) I:=[0, 1, -1, 0]; [n le 4 select I[n] else -Self(n-1) -Self(n-2) -Self(n-3) +Self(n-4): n in [1..61]]; // G. C. Greubel, Jan 30 2023
(SageMath)
@CachedFunction
def a(n): # a=A100329
if (n<4): return (0, 1, -1, 0)[n]
else: return -a(n-1)-a(n-2)-a(n-3)+a(n-4)
[a(n) for n in range(61)] # G. C. Greubel, Jan 30 2023
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Mitch Harris, Nov 16 2004
STATUS
approved