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.

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

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 5, 9, 23, 75, 421, 1103, 5047, 41783, 281527, 2534423, 14161887, 232663909, 3988834875, 45788778247, 805144998681, 14980361322965, 620933643034787, 16379818848380849, 369622905371172929, 20278641689337631649, 995586066665500470689
Offset: 0

Views

Author

Keywords

References

  • C. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 350.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006722 n = a006722_list !! n
    a006722_list = [1,1,1,1,1,1] ++
      zipWith div (foldr1 (zipWith (+)) (map b [1..3])) a006722_list
      where b i = zipWith (*) (drop i a006722_list) (drop (6-i) a006722_list)
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Magma
    [n le 6 select 1 else (Self(n-1)*Self(n-5)+Self(n-2)*Self(n-4)+ Self(n-3)^2)/Self(n-6): n in [1..30]]; // Vincenzo Librandi, Dec 02 2015
  • Mathematica
    a[n_ /; 0 <= n <= 5] = 1; a[n_] := a[n] = (a[n-1]*a[n-5] + a[n-2]*a[n-4] + a[n-3]^2) / a[n-6]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 22 2013 *)
    RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==1,a[n]==(a[n-1]a[n-5]+ a[n-2]a[n-4]+a[n-3]^2)/a[n-6]},a,{n,30}] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    {a(n) = if( n>-1 && n<6, 1, if( n<0, a(5 - n), (a(n - 1) * a(n - 5) + a(n - 2) * a(n - 4) + a(n-3) * a(n-3)) / a(n - 6)))}; /* Michael Somos, Jan 30 2012 */
    
  • Python
    from gmpy2 import divexact
    A006722 = [1,1,1,1,1,1]
    for n in range(6,101):
        A006722.append(divexact(A006722[n-1]*A006722[n-5]+A006722[n-2]*A006722[n-4]+A006722[n-3]**2,A006722[n-6]))
    # Chai Wah Wu, Sep 01 2014
    

Formula

a(n) = a(5-n).
Michael Somos found an explicit formula for a(n) in 1993, which is not as widely known as it should be. The following is a quotation from the "Somos 6 sequence" document mentioned in the Links section: (Start)
This sequence is one of a large class of sequences of numbers that satisfy a non-linear recurrence relation depending on previous terms. It is also one of the class of sequences which can be computed from a theta series, hence I call them theta sequences. Here are the details:
Fix the following seven constants:
c1 = 0.875782749065950194217251...,
c2 = 1.084125925473763343779968...,
c3 = 0.114986002186402203509006...,
c4 = 0.077115634258697284328024...,
c5 = 1.180397390176742642553759...,
c6 = 1.508030831265086447098989..., and
c7 = 2.551548771413081602906643... .
Consider the doubly indexed series: f(x,y) = c1*c2^(x*y)*sum(k2, (-1)^k2*sum(k1, g(k1,k2,x,y))) , where g(k1,k2,x,y) = c3^(k1*k1)*c4^(k2*k2)*c5^(k1*k2)*cos(c6*k1*x+c7*k2*y) . Here both sums range over all integers.
Then the sequence defined by a(n) = f(n-2.5,n-2.5) is the Somos 6 sequence. I announced this in 1993. (End) - N. J. A. Sloane, Dec 06 2015
From Andrew Hone and Yuri Fedorov, Nov 27 2015: (Start)
The following is an exact formula for a(n):
a(n+3) = A*B^n*C^(n^2 -1)*sigma(v_0 + n*v) / sigma(v)^(n^2),
where
A = C / sigma(v_0),
B = A^(-1)*sigma(v) / sigma(v_0+v),
C = i/sqrt(20) (with i the imaginary unit),
sigma is the two-variable Kleinian sigma-function associated with the genus two curve X: y^2 = 4*x^5 - 233*x^4 + 1624*x^3 - 422*x^2 + 36*x - 1, and
v and v_0 are two-component vectors in the Jacobian of X, being the images under the Abel map of the divisors P_1+P_2 - 2*infinity, Q_1 + Q_2 - 2*infinity, respectively, where points P_j and Q_j on X are given by
P_1 = ( -8 + sqrt(65), 20*i*(129 -16*sqrt(65)) ),
P_2 = ( -8 - sqrt(65), 20*i*(129 +16*sqrt(65)) ),
Q_1 = ( 5 + 2*sqrt(6), 4*i*(71 +sqrt(6)) ),
Q_2 = ( 5 - 2*sqrt{6}, 4*i*(71 -sqrt(6)) ).
The Abel map is based at infinity and calculated with respect to the basis of holomorphic differentials dx/y, x dx/y.
Approximate values from Maple are A = 0.0619-0.0317*i, B = -0.0000973-0.0000158*i, v = (-.341*i, .477*i), v_0 = (-.379-.150*i, -.259+.576*i).
(End)

Extensions

More terms from James A. Sellers, Aug 22 2000