A positive integer less than 30 million is such that if we subtract 5 from it – the resulting number is divisible by 8.
At the first step, from the number (considered originally) diminished by 5 - we subtract the eighth part. We then obtain a number that also becomes divisible by 8 after 5 is subtracted from it.
At the second step, we derive another in the same way, namely by subtracting a eighth part from the number at the end of the first step diminished by 5. The resulting number is also divisible by 8 after subtracting 5.
The operation concludes at 8th step given that at the end of 7th step we get a number that is divisible by 8 after after subtracting 5.
Determine the positive integer initially before the first step.
*** The resulting number at the end of 8th step is NOT necessarily divisible by 8 after subtracting 5.
Going backward, using f(n)=f(n-1)*8+5 ... 8 times:
start with f(0) =0 you get f(8) 11,983,725
start with f(0) =1 you get 28,760,941
start with f(0) =2 you get a number over 40M