login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100329 a(n) = -a(n-1) -a(n-2) -a(n-3) +a(n-4), a(0)=0, a(1)=1, a(2)=-1, a(3)=0. 3

%I #33 Jan 30 2023 08:53:32

%S 0,1,-1,0,0,2,-3,1,0,4,-8,5,-1,8,-20,18,-7,17,-48,56,-32,41,-113,160,

%T -120,114,-267,433,-400,348,-648,1133,-1233,1096,-1644,2914,-3599,

%U 3425,-4384,7472,-10112,10449,-12193,19328,-27696,31010,-34835,50849,-74720,89716,-100680

%N a(n) = -a(n-1) -a(n-2) -a(n-3) +a(n-4), a(0)=0, a(1)=1, a(2)=-1, a(3)=0.

%C Reflected tetranacci numbers (see 1st formula).

%H Alois P. Heinz, <a href="/A100329/b100329.txt">Table of n, a(n) for n = 0..1000</a>

%H Kai Wang, <a href="https://doi.org/10.13140/RG.2.2.19649.79209">Identities, generating functions and Binet formula for generalized k-nacci sequences</a>, 2020.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,1).

%F a(n) = A000078(-n).

%F 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.

%F G.f.: x/(1+x+x^2+x^3-x^4).

%F G.f. of absolute values: x/(1-x+x^2-x^3-x^4). - _Vaclav Kotesovec_, Oct 18 2013

%F 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

%p a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^(-n))[1, 4]:

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Jun 12 2008

%t CoefficientList[Series[x/(1+x+x^2+x^3-x^4), {x, 0, 50}], x]

%t LinearRecurrence[{-1,-1,-1,1},{0,1,-1,0},60] (* _Harvey P. Dale_, May 20 2018 *)

%o (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

%o (SageMath)

%o @CachedFunction

%o def a(n): # a=A100329

%o if (n<4): return (0,1,-1,0)[n]

%o else: return -a(n-1)-a(n-2)-a(n-3)+a(n-4)

%o [a(n) for n in range(61)] # _G. C. Greubel_, Jan 30 2023

%Y Cf. A000078.

%Y Cf. A000073 (tribonacci), A057597 (reflected tribonacci).

%K sign,easy

%O 0,6

%A _Mitch Harris_, Nov 16 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)