UP AND DOWN ARROWS SHOW AND HIDE A LIST OF ALL NUMBERS NOT IN THE SEQUENCE. EVERY TIME EACH LIST IS FILLED FULLY, IT TAKE FOREVER BUT IT CHECKS THROUGH ALL NUMBER 1-600000 TO SEE IF THEY ARE IN THE SEQUENCE, THEN IT CLEARS THE LISTS TO LOAD FASTER AND CONTINUES. The Recamán’s sequence is a sequence where you start at zero, and you go up by 1, then 2, then 3, etc, but first, you must check something: If you are able to go backwards that amount without becoming a negative or a number already in the sequence, you must go backwards, otherwise go forwards. I simulated the entire sequence in scratch so you can explore every number for yourself! Hold your mouse down to slow down the process.
Fun fact: The first number to appear twice is 42. This happens because if you land on a number already in the sequence by going up then it still counts, the only time it's not possible is if you go down and reach an existing number.