OFFSET
0,3
EXAMPLE
a(3) = 5 as a(2) = 3 = n, thus the step size from a(2) is 2. As 1 has previously appeared a(3) = a(2) + 2 = 3 + 2 = 5.
a(5) = 6 as a(3) = 5 = n, thus the step size from a(4) is 3. As 6 has not previously appeared a(5) = a(4) - 3 = 9 - 3 = 6.
a(29) = 2 as a(13) = 29 = n, and a(15) = 29, 13+15 is 28, thus the step size from a(2) is 28. As 2 has not previously appeared a(29) = a(29) - 28 = 30 - 28 = 2.
CROSSREFS
KEYWORD
nonn
AUTHOR
Kelvin Voskuijl, Feb 02 2024
STATUS
approved