Take one greedy rule — never choose a number that completes a 3-term arithmetic progression with two numbers already chosen — and apply it forever, starting from 0 and 1. The result is the most touching sequence in additive combinatorics: 0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31... — the numbers with only digits 0 and 1 in base 3, otherwise known as the Stanley sequence S(0, 1).
Stanley Numbers Generator runs the greedy construction itself: each candidate faces the midpoint test (a + b = 2c) and the endpoint test (c = 2a − b) against the growing set before admission. Choose a start index and count; each row shows the value and its base-3 digits, making the closure theorem visible term by term.