cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247540 a(n) = 2*a(n-1) - 3*a(n-1)^2 / a(n-2), with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, -1, -5, 65, 2665, -322465, -117699725, 128645799425, 422086867913425, -4153756867136015425, -122639671502190855423125, 10862563623963550637392450625, 2886411268723218638918559372525625, -2300934493386669693418957707961899750625
Offset: 0

Views

Author

Michael Somos, Sep 18 2014

Keywords

Crossrefs

Cf. A046717.

Programs

  • 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
  • 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 *)
  • PARI
    {a(n) = if( n<0, 1 / prod(k=1, -n, (1 + (-3)^-k) / 2), prod(k=0, n-1, (1 + (-3)^k) / 2))};
    

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.