OFFSET
1,15
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (0,-1,0,-1,0,1,0,1).
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
KEYWORD
easy,nice,sign
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999
STATUS
approved
