Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that $f(m+n)=f(m)+f(n)+2 m n$

207 Views Asked by At

Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that
(a) $f(n)$ is a square for each $n \in \mathbb{N}$
(b) $f(m+n)=f(m)+f(n)+2 m n$, for all $m, n \in \mathbb{N}$

I proved using induction that $f(n)=n\left(q^{2}+n-1\right)$ for all $n$, where $f(1)=q^2$.

The hint says that

Thus for each prime $p$, we see that $p$ divides $q^{2}-1$. It follows that $q=1$, and this implies that $f(n)=n^{2}$.

I do not understand from where primes come into play. How do we see that each prime $p$ divides $q^{2}-1$?

1

There are 1 best solutions below

8
On BEST ANSWER

With $p$ prime we have $f(p)=p(q^2+p-1)$. Since $f(p)$ is a square and $p$ divides $f(p)$, $p$ has to divide $f(p)$ at least twice, which means $p\mid q^2+p-1$ or $p\mid q^2-1$. Since this is true for all $p$, $q^2-1=0$, hence $q=1$.