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.

A006723 Somos-7 sequence: a(n) = (a(n-1) * a(n-6) + a(n-2) * a(n-5) + a(n-3) * a(n-4)) / a(n-7), a(0) = ... = a(6) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 5, 9, 17, 41, 137, 769, 1925, 7203, 34081, 227321, 1737001, 14736001, 63232441, 702617001, 8873580481, 122337693603, 1705473647525, 22511386506929, 251582370867257, 9254211194697641, 215321535159114017
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006723 n = a006723_list !! n
    a006723_list = [1,1,1,1,1,1,1] ++
      zipWith div (foldr1 (zipWith (+)) (map b [1..3])) a006723_list
      where b i = zipWith (*) (drop i a006723_list) (drop (7-i) a006723_list)
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Magma
    I:=[1,1,1,1,1,1,1]; [n le 7 select I[n] else (Self(n-1)*Self(n-6) + Self(n-2)*Self(n-5) + Self(n-3)*Self(n-4))/Self(n-7): n in [1..30]]; // G. C. Greubel, Feb 21 2018
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==a[6]==1,a[n] == (a[n-1]a[n-6]+a[n-2]a[n-5]+a[n-3]a[n-4])/a[n-7]},a,{n,30}] (* Harvey P. Dale, Jan 19 2012 *)
  • PARI
    {a(n) = my(v); if( n<0, n = 6-n); if( n<7, 1, n++; v = vector(n, k, 1); for( k=8, n, v[k] = (v[k-1] * v[k-6] + v[k-2] * v[k-5] + v[k-3] * v[k-4]) / v[k-7]); v[n])};
    
  • Python
    from gmpy2 import divexact
    A006723 = [1,1,1,1,1,1,1]
    for n in range(7,101):
        A006723.append(divexact(A006723[n-1]*A006723[n-6]+A006723[n-2]*A006723[n-5]+A006723[n-3]*A006723[n-4],A006723[n-7]))
    # Chai Wah Wu, Sep 01 2014
    

Formula

a(6 - n) = a(n) for all n in Z.
a(n) = ((8-2*(-1)^n)*a(n-5)*a(n-3)-a(n-4)^2)/a(n-8). - Bruno Langlois, Aug 09 2016

Extensions

More terms from James A. Sellers, Aug 22 2000