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!)
A051793 a(n) = Sum_{i=n-4..n-1} (-1)^i*a(i), a(1)=1, a(2)=1, a(3)=1, a(4)=1. 1

%I #14 May 17 2021 15:29:04

%S 1,1,1,1,0,1,1,1,1,0,-1,1,1,1,2,-1,-3,1,1,2,5,-3,-7,1,0,5,13,-7,-15,0,

%T -5,13,33,-15,-30,-5,-23,33,81,-30,-55,-23,-79,81,192,-55,-87,-79,

%U -239,192,439,-87,-95,-239,-670,439,965,-95,49,-670,-1779,965,2025,49,768

%N a(n) = Sum_{i=n-4..n-1} (-1)^i*a(i), a(1)=1, a(2)=1, a(3)=1, a(4)=1.

%H Reinhard Zumkeller, <a href="/A051793/b051793.txt">Table of n, a(n) for n = 1..10000</a>

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

%F a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=0, a(5)=1, a(6)=1, a(7)=1,

%F a(n) = -a(n-2)-a(n-4)+a(n-6)+a(n-8). - _Harvey P. Dale_, Sep 14 2012

%F G.f.: -x*(x^2+1)*(2*x^5+x^4+x^3+x^2+x+1) / (x^8+x^6-x^4-x^2-1). - _Colin Barker_, Mar 17 2015

%t RecurrenceTable[{a[1]==a[2]==a[3]==a[4]==1,a[n]==Sum[(-1)^i a[i],{i,n-4,n-1}]},a,{n,70}] (* or *) LinearRecurrence[{0, -1, 0, -1, 0, 1, 0, 1}, {1, 1, 1, 1, 0, 1, 1, 1}, 70] (* _Harvey P. Dale_, Sep 14 2012 *)

%o (Haskell)

%o a051793 n = a051793_list !! (n-1)

%o a051793_list = 1 : 1 : 1 : 1 : f [1, 1, 1, 1] [-1, 1, -1, 1] where

%o f xs'@(x:xs) as'@(a:as) = y : f (xs ++ [y]) (as ++ [a]) where

%o y = sum $ zipWith (*) xs' as'

%o -- _Reinhard Zumkeller_, Dec 16 2013

%o (PARI) Vec(-x*(x^2+1)*(2*x^5+x^4+x^3+x^2+x+1)/(x^8+x^6-x^4-x^2-1) + O(x^100)) \\ _Colin Barker_, Mar 17 2015

%K easy,nice,sign

%O 1,15

%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999

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 May 4 11:27 EDT 2024. Contains 372240 sequences. (Running on oeis4.)