The sequence for , with a fixed positive irrational number . Complementary Beatty sequences for partition the positive integers when .
For positive integers , the floor function condition is equivalent to the displayed integer inequalities. Since , a witness satisfies . Finding the least with and checking the strict upper bound therefore decides membership by binary search. Scanning successive values with a persistent increasing witness index instead enumerates all values below a bound in linear time arithmetic-operation count. Exact integer comparison avoids floating-point errors near an integer boundary.
Indeed, the numbers of terms at most are and . Their arguments sum to the integer , and neither is integral, so the counts sum to . Subtracting the count at shows that every integer occurs exactly once in the two lists together. This proof interprets reciprocity as an exact complementarity of two densities.
Articles by others on the same topic
The Beatty sequence is a sequence of numbers that can be derived from the mathematical concept of filling the real line with two sequences whose terms are the floor functions of the multiples of two irrational numbers.