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.

A174168 A (1,3) Somos-4 sequence.

Original entry on oeis.org

1, 2, 5, 17, 109, 706, 9529, 149057, 3464585, 141172802, 5987285341, 540281496721, 53055650250901, 8453268527614082, 2173247123169247025, 610193552206250342657, 364280506115937098013649, 225791960727416355391439746
Offset: 0

Views

Author

Paul Barry, Mar 10 2010

Keywords

Comments

Hankel transform of A128720.

Crossrefs

Cf. A128720.

Programs

  • Haskell
    a174168 n = a174168_list !! n
    a174168_list = [1,2,5,17] ++ zipWith div (zipWith (+)
       (zipWith (*) (tail a174168_list) (drop 3 a174168_list))
                    (map ((* 3) . (^ 2)) (drop 2 a174168_list))) a174168_list
    -- Reinhard Zumkeller, Feb 13 2012
    
  • Magma
    I:=[1,2,5,17]; [n le 4 select I[n] else (Self(n-1)*Self(n-3) + 3*Self(n-2)^2)/Self(n-4): n in [1..20]]; // G. C. Greubel, Sep 25 2018
  • Maple
    A174168 := proc(n)
            if n <=4 then
                    op(n+1,[1,2,5,17,109]) ;
            else
                    (procname(n-1)*procname(n-3)+3*procname(n-2)^2)/procname(n-4) ;
            end if;
    end proc: # R. J. Mathar, Oct 26 2011
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==2,a[2]==5,a[3]==17,a[n]==(a[n-1]a[n-3]+ 3a[n-2]^2)/a[n-4]},a[n],{n,20}] (* Harvey P. Dale, Oct 25 2011 *)
    a[ n_] := Which[n < -1, a[-2 - n], n < 2, {1, 1, 2}[[n + 2]], True, (a[n - 1] a[n - 3] + 3 a[n - 2]^2)/a[n - 4]]; (* Michael Somos, Apr 30 2020 *)
  • PARI
    m=20; v=concat([1,2,5,17], vector(m-4)); for(n=5, m, v[n] = ( v[n-1]*v[n-3] +3*v[n-2]^2)/v[n-4]); v \\ G. C. Greubel, Sep 25 2018
    

Formula

a(n) = (a(n-1)*a(n-3) + 3*a(n-2)^2)/a(n-4) [index corrected by Franklin T. Adams-Watters, Oct 26 2011].
a(n) = a(-2-n), a(n)*a(n-5) = -3*a(n-1)*a(n-4) + 16*a(n-2)*a(n-3) for all n in Z. - Michael Somos, Apr 30 2020

Extensions

More terms from Sean A. Irvine, Feb 12 2012