Find all $f : \mathbb{N} \to \mathbb{N} $ such that $f(a) + f(b)$ divides $2(a + b - 1)$ for all $a, b \in \mathbb{N}$.
I think the answer is $\boxed{f(x)=2x-1, f(x)=1}.$
$$P(1,1) \implies f(1)+f(1)| 2(1+1-1)=2\implies f(1)=1$$ $$P(1,a)\implies f(1)+f(a)|2(1+a-1)=2a \implies f(a)+1|2a \implies f(a) \le 2a-1.$$ We have $$P(1,2)\implies f(1)+f(2)|2(1+2-1)=4\implies f(2)=3~~\text{or}~~f(2)=1.$$
For $p$ an odd prime. We get,
$$P(1,p)\implies f(p)+1|2p \implies f(p)=1,p-1, 2p-1$$
Now if $f(p)=p-1 $ for some $p$ then $$P(p,p)\implies f(p)+f(p)=2(p-1) | 2(2p-1)$$
Not possible.
This was my progress... Any hints or solutions? I would prefer if someone can send a sketch of hints( Rather than a full solution).
Thanks in advance.
Let's prove it with induction that $f(n)=2n-1$ if $f$ is nonconstant.
As you proved $f(1)=1$ so the basis is done. Now by induction hypothesis we have $f(n) = 2n-1$. So let $a=n$ and $b=n+1$: $$f(n)+f(n+1)\mid 2(n+(n+1)-1)$$ so $$f (n+1)+2n-1\mid 4n \;\;\;\;\;\; (\heartsuit)$$ Now it is always true that: $$f(n+1)+2n-1\mid 2f(n+1)+4n-2\;\;\; (\diamondsuit)$$ and thus $(\diamondsuit)-(\heartsuit)$: $$f(n+1)+2n-1 \mid 2f(n+1)-2$$ This implies, if $f(n+1)>1$ that $$2n+1\leq f(n+1)$$
But you already showed that $f(a)\leq 2a-1$, for every $a$ so $f(n+1)=2n+1$ and we are done.