OFFSET
1,4
COMMENTS
This satisfies the same recurrence as Dana Scott's sequence A048736.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (0,0,-2,0,0,2,0,0,1).
FORMULA
G.f.: x * (1 + x - x^2 - 2*x^3 - 3*x^4 - x^5 - x^6 - x^7) / (1 + 2*x^3 - 2*x^6 - x^9).
a(n) = a(-5 - n) = a(n+2) * a(n-2) - a(n+1) * a(n-1) for all n in Z.
a(3*n) = (-1)^n * F(n)^2, a(3*n + 1) = (-1)^n * F(n + 2)^2 where F = Fibonacci A000045.
EXAMPLE
G.f. = x + x^2 - x^3 - 4*x^4 - 5*x^5 + x^6 + 9*x^7 + 11*x^8 - 4*x^9 - 25*x^10 + ...
MATHEMATICA
CoefficientList[Series[x*(1+x)*(1-x^2)*(1+x^3)/(1-2*x^2-2*x^4-2*x^6+x^8 ), {x, 0, 50}], x] (* or *) RecurrenceTable[{a[n] == ( a[n-1]*a[n-3] + a[n-2] )/a[n-4], a[1] == a[2] == 1, a[3] == -1, a[4] == -4}, a, {n, 1, 50}] (* G. C. Greubel, Aug 12 2018 *)
PROG
(PARI) {a(n) = my(k = n\3); (-1)^k * if( n%3 == 0, fibonacci( k )^2, n%3 == 1, fibonacci( k+2 )^2, fibonacci( k ) * fibonacci( k+3 ) + fibonacci( k+1 ) * fibonacci( k+2 ))};
(PARI) x='x+O('x^30); Vec(x*(1+x)*(1-x^2)*(1+x^3)/(1-2*x^2-2*x^4 -2*x^6 +x^8 )) \\ G. C. Greubel, Aug 12 2018
(Haskell)
a206282 n = a206282_list !! (n-1)
a206282_list = 1 : 1 : -1 : -4 :
zipWith div
(zipWith (+)
(zipWith (*) (drop 3 a206282_list)
(drop 1 a206282_list))
(drop 2 a206282_list))
a206282_list
-- Same program as in A048736, see comment.
-- Reinhard Zumkeller, Feb 08 2012
(Magma) I:=[1, 1, -1, -4]; [n le 4 select I[n] else (Self(n-1)*Self(n-3) + Self(n-2))/Self(n-4): n in [1..30]]; // G. C. Greubel, Aug 12 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Feb 05 2012
STATUS
approved