INSTRUCTING ARDUINO TO RECALL A PREVIOUSLY GIVEN VALUE

Ok. Read it more closely. You have defined 'n' in the if block, so it is local to that block. As soon as that block completes, 'n' goes out of scope, so yes, it is forgotten about. If you want it to remember it, define 'n' at the start of loop() instead.