In mathematics, a Stanley sequence is an integer sequence generated by a greedy algorithm that chooses the sequence members to avoid arithmetic progressions. If
S
S
S
The Stanley sequence starting from the empty set consists of those numbers whose ternary representations have only the digits 0 and 1. That is, when written in ternary, they look like binary numbers. These numbers are
0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, ...
By their construction as a Stanley sequence, this sequence is the lexicographically first arithmetic-progression-free sequence. Its elements are the sums of distinct powers of three, the numbers
n
n
The construction of this sequence from the ternary numbers is analogous to the construction of the Moser–de Bruijn sequence, the sequence of numbers whose base-4 representations have only the digits 0 and 1, and the construction of the Cantor set as the subset of real numbers in the interval
[0,1]
This sequence includes three powers of two: 1, 4, and 256 = 35 + 32 + 3 + 1. Paul Erdős conjectured that these are the only powers of two that it contains.
Andrew Odlyzko and Richard P. Stanley observed that the number of elements up to some threshold
n
\{0,3k\}
\{0,2 ⋅ 3k\}
log23 | |
n |
≈ n0.631
\{0,s\}
s=4
0, 4, 5, 7, 11, 12, 16, 23, 26, 31, 33, 37, 38, 44, 49, 56, 73, 78, 80, 85, 95, 99, ... Odlyzko and Stanley conjectured that in such cases the number of elements up to any threshold
n
Ol(\sqrt{nlogn}r)
Moy proved that Stanley sequences cannot grow significantly more slowly than the conjectured bound for the sequences of slow growth. Every Stanley sequence has
\Omegal(\sqrt{n}r)
n
\varepsilon>0
n
(\sqrt2-\varepsilon)\sqrtn
log23 | |
n |
A variation of the binary–ternary sequence (with one added to each element)was considered in 1936 by Paul Erdős and Pál Turán, who observed that it has no three-term arithmetic progression and conjectured (incorrectly) that it was the densest possible sequence with no arithmetic progression.
In unpublished work with Andrew Odlyzko in 1978, Richard P. Stanley experimented with the greedy algorithm to generate progression-free sequences.The sequences they studied were exactly the Stanley sequences for the initial sets
\{0,s\}
Stanley sequences were named, and generalized to other starting sets than
\{0,s\}