Consider the functional equation where f:N→N satisfies, for all positive integers m and n,
f(m)+n−m≡0(modf(n)).
This condition implies:
f(m)+n≡m(modf(n)).
We aim to find all such functions f.
### Case 1: Linear Functions of the Form f(n)=n+c
Assume f(n)=n+c for some constant c∈N. Substituting into the original equation, we have:
f(m)+n−m=(m+c)+n−m=n+c.
This implies:
n+c≡m(modn+c).
The left-hand side is divisible by n+c since:
n+c−m≡0(modn+c),
which is trivially true for any integer m. Thus, f(n)=n+c is a valid solution.
### Case 2: Constant Function f(n)≡1
Assume f(n)≡1. Substituting into the original equation, we have:
f(m)+n−m≡0(mod1),
which simplifies to:
(m+n−m)≡0(mod1),
which is always true. Thus, f(n)=1 is a valid solution.
### Case 3: Piecewise Function f(even)=1,f(odd)=2
Consider f(n)=1 for even n and f(n)=2 for odd n.
1. **n is even**: f(n)=1. The equation becomes:
f(m)+n−m≡0(mod1),
which holds true since any number is divisible by 1.
2. **n is odd**: f(n)=2. The equation becomes:
f(m)+n−m≡0(mod2).
For any m and odd n, n−m≡0(mod2) as both n and m would have the same parity.
Thus, f(even)=1,f(odd)=2 is a valid solution.
### Case 4: Piecewise Function f(odd)=1,f(even)=2
Consider the similar argument for the reverse configuration:
1. **n is odd**: f(n)=1. The equation becomes:
f(m)+n−m≡0(mod1),
which holds true.
2. **n is even**: f(n)=2. The equation becomes:
f(m)+n−m≡0(mod2).
For any m and even n, both n and m would have the same parity, thus maintaining divisibility.
Hence, f(odd)=1,f(even)=2 is also a valid solution.
### Conclusion
The functions that satisfy the given conditions are:
f(n)=n+c,f(n)≡1,f(even)=1,f(odd)=2,f(odd)=1,f(even)=2.