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
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, -5, 13, 33, -15, -30, -5, -23, 33, 81, -30, -55, -23, -79, 81, 192, -55, -87, -79, -239, 192, 439, -87, -95, -239, -670, 439, 965, -95, 49, -670, -1779, 965, 2025, 49, 768 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,15
LINKS
FORMULA
a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=0, a(5)=1, a(6)=1, a(7)=1,
a(n) = -a(n-2)-a(n-4)+a(n-6)+a(n-8). - Harvey P. Dale, Sep 14 2012
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
MATHEMATICA
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 *)
PROG
(Haskell)
a051793 n = a051793_list !! (n-1)
a051793_list = 1 : 1 : 1 : 1 : f [1, 1, 1, 1] [-1, 1, -1, 1] where
f xs'@(x:xs) as'@(a:as) = y : f (xs ++ [y]) (as ++ [a]) where
y = sum $ zipWith (*) xs' as'
-- Reinhard Zumkeller, Dec 16 2013
(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
CROSSREFS
Sequence in context: A117811 A349431 A297381 * A065371 A300982 A354203
KEYWORD
easy,nice,sign
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999
STATUS
approved

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 April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)