# Somos sequence

In mathematics, a Somos sequence is a sequence of numbers defined by a certain recurrence relation, described below. They were discovered by mathematician Michael Somos. From the form of their defining recurrence (which involves division), one would expect the terms of the sequence to be fractions, but surprisingly, a few Somos sequences have the property that all of their members are integers.

## Recurrence equations

For an integer number k larger than 1, the Somos-k sequence $(a_{0},a_{1},a_{2},\ldots )$ is defined by the equation
    $a_{n}a_{n-k}=a_{n-1}a_{n-k+1}+a_{n-2}a_{n-k+2}+\cdots +a_{n-(k-1)/2}a_{n-(k+1)/2}$
when k is odd, or by the analogous equation
    $a_{n}a_{n-k}=a_{n-1}a_{n-k+1}+a_{n-2}a_{n-k+2}+\cdots +(a_{n-k/2})^{2}$
when k is even, together with the initial values
    a$_i$ = 1 for i < k.
For k = 2 or 3, these recursions are very simple (there is no addition on the right-hand side) and they define the all-ones sequence (1, 1, 1, 1, 1, 1, ...). In the first nontrivial case, k = 4, the defining equation is
    $a_{n}a_{n-4}=a_{n-1}a_{n-3}+a_{n-2}^{2}$
while for k = 5 the equation is
    $a_{n}a_{n-5}=a_{n-1}a_{n-4}+a_{n-2}a_{n-3}\,.$
These equations can be rearranged into the form of a recurrence relation, in which the value a$_n$ on the left hand side of the recurrence is defined by a formula on the right hand side, by dividing the formula by a$_{n−k}$. For k = 4, this yields the recurrence
    $a_{n}={\frac {a_{n-1}a_{n-3}+a_{n-2}^{2}}{a_{n-4}}}$
while for k = 5 it gives the recurrence
    $a_{n}={\frac {a_{n-1}a_{n-4}+a_{n-2}a_{n-3}}{a_{n-5}}}.$
While in the usual definition of the Somos sequences, the values of a$_i$ for i < k are all set equal to 1, it is also possible to define other sequences by using the same recurrences with different initial values.

## Sequence values

The values in the Somos-4 sequence are
    1, 1, 1, 1, 2, 3, 7, 23, 59, 314, 1529, 8209, 83313, 620297, 7869898, ... (sequence A006720 in the OEIS).
The values in the Somos-5 sequence are
    1, 1, 1, 1, 1, 2, 3, 5, 11, 37, 83, 274, 1217, 6161, 22833, 165713, ... (sequence A006721 in the OEIS).
The values in the Somos-6 sequence are
    1, 1, 1, 1, 1, 1, 3, 5, 9, 23, 75, 421, 1103, 5047, 41783, 281527, ... (sequence A006722 in the OEIS).
The values in the Somos-7 sequence are
    1, 1, 1, 1, 1, 1, 1, 3, 5, 9, 17, 41, 137, 769, 1925, 7203, 34081, ... (sequence A006723 in the OEIS).
The first 17 values in the Somos-8 sequence are
    1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 13, 25, 61, 187, 775, 5827, 14815 [the next value is fractional].

## Integrality

The form of the recurrences describing the Somos sequences involves divisions, making it appear likely that the sequences defined by these recurrence will contain fractional values. Nevertheless, for k ≤ 7 the Somos sequences contain only integer values. Several mathematicians have studied the problem of proving and explaining this integer property of the Somos sequences; it is closely related to the combinatorics of cluster algebras.
For k ≥ 8 the analogously defined sequences eventually contain fractional values. For Somos-8 the first fractional value is the 18th term with value 420514/7.
For k < 7, changing the initial values (but using the same recurrence relation) also typically results in fractional values.