Determine all functions $f:\mathbb{Z} \rightarrow \mathbb{Z}$ which satisfy the following equations:
a) $f(f(n))=4n+3$ $\forall$ $n \in \mathbb{Z}$;
b) $f(f(n)-n)=2n+3$ $\forall$ $n \in \mathbb{Z}$.
Pinko wrote:
Determine all functions $f:\mathbb{Z} \rightarrow \mathbb{Z}$ which satisfy the following equations:
a) $f(f(n))=4n+3$ $\forall$ $n \in \mathbb{Z}$;
b) $f(f(n)-n)=2n+3$ $\forall$ $n \in \mathbb{Z}$.
Met $P(n)$ be the assertion $f(f(n))=4n+3$
Let $Q(n)$ be the assertion $f(f(n)-n)=2n+3$
$P(n)$ implies $f(x)$ is injective
Comparing $P(n)$ and $Q(2n)$ and using injectivity, we get $f(2n)=f(n)+2n$
And so $f(4n)=f(2n)+4n=f(n)+6n$
So $f(4(f(n)-n))=f(f(n)-n)+6f(n)-6n=6f(n)-4n+3$
$P(n)$ implies $f(4n+3)=4f(n)+3$
$Q(4n+3)$ $\implies$ $f(4(f(n)-n))=8n+9$
And so, comparing the two values we got for $f(4(f(n)-n))$ :
$6f(n)-4n+3=8n+9$
Which is $\boxed{f(n)=2n+1\quad\forall n}$ which indeed is a solution