[Math] If $f(f(n))+f(n)=2n+2014$, find $f$.

functional-equationsfunctions

Let the function $f:\mathbb N^{+}\to\mathbb N^{+}$ such
$$f(f(n))+f(n)=2n+2014.$$

Find $f$.

My try: let $n=1$, then we have
$$f(f(1))+f(1)=2016$$
let $f(1)=a$,then
$$f(a)+a=2016$$
and let $n=a$, then
$$f(f(a))+f(a)=2a+2014$$
so
$$f(2016-a)+2016-a=2a+2014$$
so$$ f(2016-a)=3a-2$$
then I can't. Thank you.

Best Answer

There is no such function. (Edit: This is a simplification of the original argument.)

The functional equation implies that $f(f(n))\leq2n+2014$ holds for all $n$. Inductively define a sequence $a_0=1$ and $a_n=f(a_{n-1})$ for $n>0$. Observe:

Lemma. For all $n$, we have $a_{2n}\leq 2015\cdot 2^n-2014$.

Proof. We prove this by induction. It is true for $n=0$. Suppose it is true for $n-1$. Then $$a_{2n}=f(f(a_{2n-2}))\leq 2a_{2n-2}+2014\leq2(2015\cdot2^{n-1}-2014)+2014=2015\cdot 2^n-2014.$$ This completes the proof. $\square$

On the other hand, our sequence satisfies a recurrence: $$a_n+a_{n-1}=f(f(a_{n-2}))+f(a_{n-2})=2a_{n-2}+2014\qquad (n\geq2)$$ This has a unique solution (with $a_0=1$ and $a_1=a:=f(1)$) $$a_n=\frac19(-2008+(2017-3a)(-2)^n+3a+6042n).$$

But $2017$ is not divisible by $3$, so the coefficient of $(-2)^n$ is nonzero. This is a contradiction, since $4^n=(-2)^{2n}$ grows faster than $2^n$, contradicting our lemma.