OFFSET
0,2
LINKS
Scott R. Shannon, Image of the first 1000000 terms.
EXAMPLE
a(1) = 4 as |1 - a(0)| = |1 - 1| = 0, and 0 + 4 = 4 = 2^2 is the next smallest square. Note a(1) cannot be 1 as a(0) = 1.
a(4) = 8 as |4 - a(3)| = |4 - 3| = 1, and 1 + 8 = 9 = 3^2 is the next smallest square. Note a(4) cannot be 3 as a(3) = 3.
a(8) = 15 as |8 - a(7)| = |8 - 7| = 1, and 1 + 15 = 16 = 4^2 is the next smallest square. Note a(8) cannot be 3 or 8 as these have previously occurred.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Nov 08 2021
STATUS
approved