OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..19
FORMULA
0 = a(n)*a(n+3) + a(n+1)*a(n+2) - a(n+2)*a(n+2) for all n>0.
a(n+1) = - a(n) * A243004(n) for all n>0.
a(3*n) > 0, a(3*n + 1) > 0, a(3*n + 2) < 0 for all n>=0.
MATHEMATICA
RecurrenceTable[{a[n] == a[n - 1]*(a[n - 1] - a[n - 2])/a[n - 3],
a[0] == 2, a[1] == 1, a[2] == -1}, a, {n, 0, 15}] (* G. C. Greubel, Aug 06 2018 *)
PROG
(PARI) {a(n) = if( n<0, 0, if( n<3, [2, 1, -1][n+1], (a(n-1) - a(n-2)) * a(n-1) / a(n-3)))};
(Magma) I:=[2, 1, -1]; [n le 3 select I[n] else Self(n-1)*(Self(n-1) - Self(n-2))/Self(n-3): n in [1..15]]; // G. C. Greubel, Aug 06 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Aug 17 2014
STATUS
approved