OFFSET
0,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..60
FORMULA
0 = a(n)*(-2*a(n+1) + a(n+2)) + a(n+1)*(+3*a(n+1)) for all n in Z.
a(n+1) = a(n) * (-1)^n * A046717(n) for all n in Z.
a(1-n) = (-3)^(n*(n-1)/2) / a(n) for all n in Z.
MATHEMATICA
RecurrenceTable[{a[n] == 2*a[n-1] - 3*a[n-1]^2/a[n-2], a[0]==1, a[1]==1}, a, {n, 0, 30}] (* G. C. Greubel, Aug 04 2018 *)
PROG
(PARI) {a(n) = if( n<0, 1 / prod(k=1, -n, (1 + (-3)^-k) / 2), prod(k=0, n-1, (1 + (-3)^k) / 2))};
(Haskell)
a247540 n = a247540_list !! n
a247540_list = 1 : 1 : zipWith (-)
(map (* 2) xs) (zipWith div (map ((* 3) . (^ 2)) xs) a247540_list)
where xs = tail a247540_list
-- Reinhard Zumkeller, Sep 20 2014
(Magma) I:=[1, 1]; [n le 2 select I[n] else 2*Self(n-1) - 3*Self(n-1)^2/Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 04 2018
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Sep 18 2014
STATUS
approved