let f function from z to z(integers)
f(n)=n - 3 at n > 999
f(n)= f(f(n+5) at n < 1000
for is determined by the parity of .
Meaning if is odd. And if is even.
We can show this by Strong Induction.
Now, if and odd we have,
But by induction and the fact is even
And, if and even we have,
But by induction and the fact is odd
The above gives us an explicit formula for f(n).