Determine all functions $f: \mathbb{Z}\to\mathbb{Z}$ satisfying \[f\big(f(m)+n\big)+f(m)=f(n)+f(3m)+2014\] for all integers $m$ and $n$. Proposed by Netherlands
Problem
Source:
Tags: function, IMO Shortlist, algebra, functional equation, IMO Shortlist 2014
11.07.2015 19:39
Let $g = f(n) - f(0)$ and $f(0) = c$, thus $g(0) = 0$ and the functional equation becomes \[ g(g(m)+n+c) + g(m) = g(3m) + g(n) + 2014. \qquad (1) \]With $m=0$ in (1) we have \[ g(n+c) = g(n) + 2014. \qquad (2) \]In particular, $c \neq 0$ and $g(kc) = 2014k$ for all $n \in \mathbb Z$. With $n=-c$ in (1) we have \[ g(g(m)) + g(m) = g(3m) \qquad (3) \]This implies \[ g(g(m)+n+c) = g(g(m)) + g(n) + 2014 \]or shifting $n$ by $c$, \[ g(g(m)+n) = g(g(m)) + g(n) \qquad (4) \]If we apply $m=c$ in (4), we then obtain \[ g(n+2014) = g(n) + g(2014). \qquad (5) \]In particular, this implies that $g(2014k) = k \cdot g(2014)$. Combining (2) and (5) we find that \[ g(n+2014c) = g(n)+2014^2 = g(n) + c \cdot g(2014) \implies c \cdot g(2014) = 2014^2. \]But if we take $m = n = c$ in (1) we find that \[ g(2014+2c) = 4 \cdot 2014 \]thus $g(2014) = 2 \cdot 2014$, which implies $c = 1007$. Thus we know that \[ g(n+1007) = g(n) + 2014. \qquad (6) \]From (6) we see in particular $g(1007k) = 2014k$. Now from the last remark and repeated use of (4) we deduce \[ 2014g(m) = g(1007g(m)) = 1007g(g(m)) \implies g(g(m)) = 2g(m). \]Inserting this into (3) informs us that \[ g(3m) = 3g(m) \]for any integer $m$. Then as suggested below \[ 3^{\varphi(1007)}g(n) = g(3^{\varphi(1007)}n) = g\left( 1007 \cdot \tfrac{3^{\varphi(1007)}-1}{1007} n + n\right) = g(n) + 2014 \cdot \tfrac{3^{\varphi(1007)}-1}{1007} n \]and hence $g(n) = 2n$. Thus, the only solution is \[ f(n) = 2n + 1007. \]It is trivial to check that this solution works.
13.07.2015 21:56
v_Enhance wrote: Since $\gcd(1007, 3) = 1$, $3^k$ covers all nonzero residues modulo $1007$; . Can you explain in detail why this is true? thanks
14.07.2015 06:46
PatrikP wrote: v_Enhance wrote: Since $\gcd(1007, 3) = 1$, $3^k$ covers all nonzero residues modulo $1007$; . Can you explain in detail why this is true? thanks That statement actually is not necessarily true. Here is a counterexample. Although $\gcd(3, 8) = 1$, it is easy to check that $3^k$ only covers $1$ and $3$ in $\mathbb{Z}_8$. This is a giant hole in the proof. I have been trying to patch it up with a bit of abstract algebra, but it is not working. Note that $\mathbb{Z}_{1007}$ is not a field because $1007 = 19 \cdot 53$ is not prime.
14.07.2015 10:59
aleph_naught wrote: That statement actually is not necessarily true. Here is a counterexample. Although $\gcd(3, 8) = 1$, it is easy to check that $3^k$ only covers $1$ and $3$ in $\mathbb{Z}_8$. This is a giant hole in the proof. I have been trying to patch it up with a bit of abstract algebra, but it is not working. Note that $\mathbb{Z}_{1007}$ is not a field because $1007 = 19 \cdot 53$ is not prime. The issue can be avoided by the following argument: using $g(3m) = 3g(m)$ and then (6) gives us $$ \left(3^{\varphi(1007)}-1\right)g(n) = g\left(3^{\varphi(1007)}n\right) - g(n) = 2\left(3^{\varphi(1007)}-1\right)n. $$
14.07.2015 16:49
Yes, I slipped up! Thanks for pointing that out, I've edited my solution to fix this hole using GaryTam's suggestion.
23.07.2015 20:21
Let $k=f(0), N=2014$. Then $f(k+n)=f(n)+N$, so $k \ne 0$. Then if $g(m)=f(m)-mN/k$, $g(m)$ is periodic and thus bounded. Assume, $f(a)=f(b)$, for some $a \ne b$. Then $f(3a)=f(3b), f(3^ra)=f(3^rb)$, for all integral $r$, which would be impossible for large $r$ since $g$ is bounded. Now if $n=3m-f(m)$, then $f(m)=f(3m-f(m))+N$, which means that $3m-f(m)+k=m$, or $f(m)=2m+k$. It easily follows that $k=1007$.
27.11.2015 01:11
Let $P(m, n)$ be the given assertion. Let $c = f(0)$ and let $\alpha = \max\{|f(1)|, |f(2)|, \cdots, |f(|c|)|\}$ ($c \ne 0$ is guaranteed by (1) below). \[P(0, n) \implies f(n + c) = f(n) + 2014. \qquad (1)\]Thus, by induction, we easily establish \[f(n + kc) = f(n) + 2014k \quad \forall k \in \mathbb{Z}. \qquad (2)\]Then given any $x \in \mathbb{Z}$, by the Division Algorithm, we may write $x = r + qc$ with $0 \le r < |c|.$ Since $|f(r)| \le \alpha$, it follows by (2) that \[-\alpha + 2014q \le f(x) \le \alpha + 2014q.\]Substituting $q = \frac{x - r}{c}$ and using $\left|\frac{r}{c}\right| < 1$, we obtain \[-\alpha + \frac{2014x}{c} - 2014 < f(x) < \alpha + \frac{2014x}{c} + 2014. \qquad (3)\]Meanwhile, \[P(n, n) \implies f(f(n) + n) = f(3n) + 2014. \qquad (4)\] Now, we claim that $f$ is injective. Suppose, by way of contradiction, that $f(y) = f(z)$ but $y \ne z.$ Then \[P(y, z) \implies f(f(z) + z) = f(3y) + 2014. \qquad (5)\]Comparing (4) and (5), it follows that $f(3y) = f(3z)$, and a straightforward induction argument yields $f\left(3^ty\right) = f\left(3^tz\right)$ for all $t \in \mathbb{N}.$ However, it is clear that for sufficiently large $t$, (3) cannot hold for both $3^ty$ and $3^tz$, which is a contradiction. Thus, $f$ is injective, as desired. To finish, according to (1), we may rewrite (4) as $f(f(n) + n) = f(3n + c).$ By injectivity, we obtain $f(n) = 2n + c.$ Substituting this expression for $f$ into the original function equation, we deduce $c = 1007$, giving us our only solution, $\boxed{f(x) = 2x + 1007}.$
06.12.2015 08:35
Let $P(m, n)$ be what it usually means. I'll break it down into parts so it's not one big mess.
16.05.2016 19:38
polya78 wrote: Then if $g(m)=f(m)-mN/k$, $g(m)$ is periodic and thus bounded. It's false. There's contrexample : $f(x)=\frac{1}{sinx}$ The function is periodic, aber is not bounded. Am I wrong ?
16.05.2016 19:55
$f$ and $g$ have integer domains...
16.05.2016 20:12
Oops.. Too long not sleeping
22.05.2016 21:18
samirka259 wrote: It's false. There's contrexample : $f(x)=\frac{1}{sinx}$ The function is periodic, aber is not bounded. In fact this function is not periodic either. In general, a periodic continuous function $f : \mathbb R \to \mathbb R$ must be bounded. To see this, WLOG the period is $1$, so we can take a restriction $f : [0,1] \to \mathbb R$. Since $f$ is continuous and $[0,1]$ is compact, it follows that $f$ is bounded (in fact, the image of $f$ is compact).
23.05.2016 05:52
Take $f(0)=c$. Step 1. We show $c=1007$. Take $P(0,n) \implies f(n+c) = f(n)+2014 \implies f(n+ck)=f(n)+2014k \implies f(c^2)=f(0)+2014c=2015c$. Take $$P(c^2,n) \implies f(n+f(c^2))+f(c^2)=f(n)+f(3c^2)+2014 \implies f(n+2015c) + 2015c = f(n)+c+3c \cdot 2014 + 2014$$$$\implies f(n)+2014 \cdot 2015 + 2015c = f(n)+c + 3c \cdot 2014 + 2014 \implies c=1007$$ Take $g(n)=f(n)-f(0)=f(n)-1007$. Then some work shows $g(g(m)+n)+g(m)=g(n)+g(3m)$, and $g(1007k)=2014k$. Step 2. We show $g(3m)=3g(m)$. Take $n=0$. This gives $g(g(m))+g(m)=g(3m)$, and replacing that gives $g(g(m)+n)=g(g(m))+g(n)$. This gives $g(kg(m))=kg(g(m))$. Now setting $k=1007$, we now have $$1007g(g(m))=g(1007g(m)) = 2014g(m) \implies g(g(m))=2g(m) \implies g(3m)=g(g(m))+g(m)=3g(m)$$ Step 3. Take a $k$ such that $3^k \equiv 1 \pmod{1007}$. Now $3^kg(m)=g(3^km)=g(m)+2 \cdot (3^k-1)m \implies g(m)=2m \implies f(m)=2m+1007$.
07.06.2016 06:24
Letting $m=0$ gives $ f(f(0)+n)=f(n)+2014. \qquad (1)$ The original equation then becomes $f(f(m)+n) = f(f(0)+n)+(f(3m)-f(m)) \implies f(n+(f(m)-f(0))) = f(n) + (f(3m)-f(m)). \qquad (2)$ Combining (1) and (2) gives \[ f(f(0)(f(m)-f(0)) + n) = f(n) + 2014(f(m)-f(0)) = f(n) + (f(3m)-f(m))f(0) \implies f(3m) = \frac{(2014+f(0))f(m)}{f(0)} - 2014, \qquad (3) \]noting that $f(0)=0$ would contradict (1). Putting this into the original equation and simplifying gives \[ f(f(m)+n) = f(n) + \frac{2014}{f(0)}f(m) = f(n) + df(m), \qquad (4) \]where we let $c=f(0)$ and $d=\frac{2014}{c}.$ Letting $n=0$ gives $f(f(m)) = c+df(m). \qquad (5)$ Then letting $n=f(m)$ in (4) gives $f(2f(m)) = f(f(m)) + df(m) = c+2df(m)$. We then put $n=2f(m)$ in (4), giving $f(3f(m)) = c+3df(m). \qquad (6)$ By (3), (5), (6), $c+3df(m) = f(3f(m)) = (1+d)f(f(m)) - 2014 = (1+d)(c+df(m)) - 2014 = c+df(m) + d^2f(m) \implies 3f(m) = f(m)+df(m)$. Since $f(m) = 0$ for all $m$ is not a solution, there exists some $m$ such that $f(m)\neq 0$, from which we conclude that $d=2$ and $c=1007$. (1) now becomes $f(1007+n) = f(n)+2014. \qquad (7)$ (3) now becomes $f(3m) = 3f(m) - 2014. \qquad (8)$ We can iteratively apply (8) and prove by induction that \[ f(3^k m) = 3^k f(m) - 1007(3^k-1). \qquad (9) \] If we let $k = \varphi{(1007)}$, then $3^k \equiv 1 \pmod{1007}$, so we can apply (7) to get \[ f(3^k m) = f(m) + 2(3^k - 1)m. \qquad (10) \] Combining (9) and (10) gives \[ f(m) = 2m+1007, \]for all integers $m$, which we can verify is indeed a solution.
03.01.2018 11:12
Can anybody check the proof of my claim about injectivity ? It looks wrong but I can't figure it out.
24.02.2018 06:59
31.08.2018 03:07
More general equation, but for $f \colon \mathbb Q \to \mathbb Q$ is considered here. Try it out, it's interesting.
03.12.2018 01:10
Is there any motivation for any of the solutions?
21.07.2019 10:55
Define $k=f(0)$. We see that \[P(0,n)\implies \boxed{f(n+k)=f(n)+2014}.\]We see that \[P(m+k,n)\implies f(f(m)+n+2014)+f(m)+2014=f(n)+f(3m)+3\cdot 2014+2014,\]which combined with $P(m,n)$ implies that \[f(f(m)+n+2014)=2\cdot 2014+f(f(m)+n).\]Fixing $m$, we see that $\boxed{f(x+2014)=f(x)+2\cdot 2014}$. Thus, \[2014^2=f(x+2014k)-f(x)=2\cdot 2014k,\]so $k=1007$, so $\boxed{f(x+1007)=f(x)+2014}$. Furthermore, we have \[2014f(m)=f(n+1007f(m))-f(n)=1007(2014+f(3m)-f(m)),\]so $\boxed{f(3m)+2014=3f(m)}$. Let $a=\phi(1007)$, so by Euler's theorem, there exists $\ell\ne 0$ such that $3^a=1+1007\ell$. We now compute \begin{align*} f(3^a m) &= 3f(3^{a-1}m)-2014 \\ &= 3\left[3f(3^{a-2}m)-2014\right]-2014 \\ &\vdots\\ &=3^a f(m)-2014(1+3+\cdots+3^{a-1}) \\ &= 3^a f(m)-1007^2\ell. \end{align*}We now see that \[3^a f(m)-1007^2\ell=f((1+1007\ell)m)=f(m)+2014m\ell,\]so \[1007\ell f(m)=1007\ell(2m+1007).\]Thus, $\boxed{f(m)=2m+1007}$, which we can easily verify works.
06.06.2020 06:10
Denote the assertion as $P(m,n)$. Note that $P(0,n)$ yields $f(f(0)+n)=f(n)+2014$ and comparing $P(m,n)$ and $P(m+f(0),n)$ for varying $n$ gives that $f(2014+n)=f(n)+4028$. Thus, $f(n+2014f(0))-f(n)=2014^2=4028f(0)$, and $f(0)=1007$. So, we have that $f(1007+n)=f(n)+2014$, implying that $f(x)=2x+g(x\pmod {1007})$, where $g$ is some function $\mathbb{Z}/1007\mathbb{Z}\to\mathbb Z$. Now, suppose we have that $f(a)=f(b)$ for $a<b$. Considering $P(a,n)$ and $P(b,n)$ gives $f(3a)=f(3b)$, so $f(3^{936}a)=f(3^{936}b)$, and hence $f(a)=f(\text{big number congruent to b }\pmod{1007})$ after subtracting out a lot of $1007$s, which gives a clear contradiction. So, we have injectivity, and in particular this means that $g$ is injective over the residue classes $\pmod{2014}$. However, there are less than $1007$ residues $\pmod{2014}$ which are not coprime with $1007$, so choose $m$ such that $f(m)\equiv k\pmod{1007}$ with $\gcd(k,1007)=1$, and consider what happens when we vary $n$. The value $f(f(m)+n)-f(n)$ is fixed over all values of $n$, meaning that $g(k+n)-g(n)$ is also a fixed value $c$. However, as this gives $g(0)=g(0)+1007c$, we have $c=0$, and $g$ is constant. As we already had $f(0)=1007$, $g(x)\equiv 1007$, and so $f(x)=2x+1007$, which can be easily verified to work.
07.06.2020 15:36
Here's a solution which doesn't require finding $f(0)$: The only such function is $f(n)=2n+1007$, which can easily be seen to work. Now, we show this is the only solution. Denote the given assertion as $P(m,n)$. Let $f(0)=A$, and note that $$P(0,n) \Rightarrow f(n+A)=f(n)+2014 \Rightarrow f(m+zA)-f(n+zA)=f(m)-f(n) \quad (\spadesuit)$$where $z$ is an integer. In particular, the first equality also gives $A \neq 0$. We claim that $f$ is injective. FTSOC suppose that we have $f(u)=f(v)$ for some integers $u,v$. Comparing $P(u,n)$ and $P(v,n)$, we get that $f(3u)=f(3v)$, or inductively that $f(3^ku)=f(3^kv)$ for $k \in \mathbb{N}$. Using $(\spadesuit)$, we have $f((3^k-zA)u)=f(3^kv-zAu)$. Taking $k=\varphi(|A|)$ and $z=\frac{3^k-1}{A}$ (which is an integer by the definition of Euler Totient Function), we get $$f(v)=f(u)=f((3^k-zA)u)=f(3^kv-zAu)$$Then, again using $(\spadesuit)$, we can see that $$f(v+z(u-v)A)=f(3^kv-zAu+z(u-v)A)=f((3^k-zA)v)=f(v)$$This implies, with the help of $P(0,n)$, that $$f(v)=f(v+z(u-v)A)=f(v)+2014z(u-v)$$Since $z \neq 0$, so we have $u=v$, as desired. Now, $$P(m,m) \Rightarrow f(m+f(m))=f(3m)+2014=f(3m+A) \Rightarrow m+f(m)=3m+A$$So, $f(m)=2m+A$. Plugging this into $P(0,n)$, we have $A=1007$. $\blacksquare$
26.12.2020 21:20
Nice problem! The only solution is $\boxed{f\equiv 2n+1007}.$ It is easy to check this works, so it remains to show it is the only one. Let $P(m,n)$ denote the assertion. $\textbf{Claim: }$ $f(0)=1007$ $\emph{Proof: }$ First, $P(0,n)$ gives $f(f(0)+n)=f(n)+2014$ for all $n.$ Then, from $P(m+f(0),n-f(m))$ and $P(m,n-f(m))$ we have \begin{align*} f(n+2014) &= f(f(m+f(0))+n-f(m))\\ &= f(n-f(m))+f(3m+3f(0))+2014-f(m+f(0))\\ &= f(n-f(m))+f(3m)+2014-f(m)+6042\\ &= f(n)+4028. \end{align*}Therefore, $$f(n)+4028f(0)=f(n+2014f(0)=f(n)+2014^2,$$so $f(0)=1007,$ as desired. $\blacksquare$ $\textbf{Claim: }$ $f(3m)=3f(m)-2014$ for all $m$ $\emph{Proof: }$ Rearranging the assertion $P(m,n)$ yields $$f(f(m)+n)-f(n)=f(3m)-f(m)+2014).$$Hence, $$f(1007f(m)+n)-f(n)=1007(f(3m)-f(m)+2014).$$On the other hand, since $f(n+1007)-f(n)=2014$ for all $n,$ we have $$f(1007f(m)+n)-f(n)=2014f(m).$$Equating the right sides of the two above equations, we obtain $f(3m)=3f(m)-2014,$ as needed. $\blacksquare$ Now, since $\{1,3,3^2,\dots\}$ forms a complete residue system modulo $1007$ and we have $f(m+1007)=f(m)+2014)$ for all $m,$ we must have that $f$ is linear. From here, it is easy to check that the claimed solution is the only one.
14.03.2021 00:09
The only solution is $f(x) = 2x + 1007$, which obviously works. Let $P(x,y)$ denote the expression, and let $c = f(0)$. By $P(0,n)$, we get $f(c + n) = f(n) + 2014$. By $P(m+c, n)$, we get \[f(f(m+c) + n) + f(m+c) = f(n) + f(3m+3c) + 2014\]\[\Rightarrow f(f(m) + n + 2014) +f(m) = f(n) + f(3m) + 2014\cdot 3\]Since $f(f(m) + n) + f(m) = f(n) + f(3m) + 2014$, this means \[f(f(m) + n + 2014) = f(f(m) + n) + 2014\cdot 2 \Rightarrow f(x+2014) = f(x) + 2014\cdot 2\]We have \[f(2014c) = 2014\cdot 2014 = 2014\cdot 2\cdot c \Rightarrow c = 1007\]I claim $f$ is injective. By $P(m,0)$, we have \[f(f(m)) + f(m) = f(0) + f(3m) + 2014\]Therefore, if $f(a) = f(b)$, then $f(3a) = f(3b)$, and since $1007 | 3^{\varphi(1007)} - 1$, we have \[f(a) + 2(3^{1006} - 1)a = f(3^{\varphi(1007)}a) = f(3^{\varphi(1007)}b) = f(b) + 2(3^{1006} - 1)b\]This means $a=b$, which proves injectivity. Now, consider $P(m,3m-f(m))$. We get \[f(3m) + f(m) = f(3m-f(m)) + f(3m) +2014 \Rightarrow f(m) = f(3m-f(m) + 1007)\]This means $m = 3m-f(m) + 1007$, or $f(m) + 2m + 1007$, which must therefore be our only solution.
21.04.2021 17:09
Let $P(m,n)$ denote $\big(f(m)+n\big)+f(m)=f(n)+f(3m)+2014$. Claim. $f(0)=1007$ and $f(1007n+m)=2014n+f(m)$ $P(0,n)\implies f(n+f(0))=f(n)+2014$ and by induction we have that $f(nf(0))=2014n+f(0)\forall n\in\mathbb Z$. \begin{align*}P(nf(0),n)&\implies f(2015n+f(0))+2014n+f(0)=f(n)+f(3nf(0))+2014=f(n)+3\cdot 2014n+f(0)+2014\\&\implies f(2015n+f(0))=f(n)+2\cdot 2014n+2014\\&\overset{n=f(0)}{\implies} f(2016f(0))=f(f(0))+2\cdot 2014f(0)+2014\\&\implies 2014\cdot 2016+f(0)=f(0)+2\cdot 2014f(0)+2\cdot 2014\\&\implies 2014^2=2\cdot 2014f(0)\\&\implies f(0)=1007\end{align*}Therefore, $f(n+1007)=f(n)+2014\forall n\in\mathbb{N}$ and by induction, $f(1007n+m)=2014n+f(m)\forall m,n\in\mathbb{N}$. Claim. $f$ is injective For the sake of contradiction, let $f(a)=f(b)$ with $a\neq b$. As $P(m,0)\implies f(f(m))+f(m)=f(0)+f(3m)+2014$, we have also $f(3a)=f(3b)$. By induction, $f(3^ka)=f(3^kb)$. As $\exists r\in\mathbb N$ so that $3^{r}\equiv 1\pmod{1007}$, we rewrite $3^{r}a$ and $3^{r}b$ as \[\begin{cases} 3^ra &= 1007x+a \\ 3^rb &=1007y+b. \end{cases}\]Note that as $a\neq b$, $x\neq y$. By the property $f(1007n+m)=2014n+f(m)$, we may reduce $3^{r}a$ to $a$ by subtracting $1007x$. Thus, we have that \begin{align*} f(b)&=f(a)\\&=f(3^{r}a-1007x)\\&=f(3^{r}a)-2014x\\&=f(3^{r}b)-2014x\\&=f(b+1007y)-2014x\\&=f(b+1007(y-x))\\&=f(b)+2014(y-x), \end{align*}which is a contradiction. Now, $P(m,m)\implies f(f(m)+m)=f(3m)+2014=f(3m+1007)$ and by injectivity, we have $f(m)=2m+1007$ for all $m\in\mathbb Z$. This obviously works, we are done.
07.09.2021 14:21
Here is a solution that doesn't require computing $f(0)$. Let $P(m,n)$ denote the above assertion and let $f(0) = c$. Notice that $$f(n+c) = f(n)+2014$$by $P(0,n)$ and clearly $c \neq 0$. Moreover $$f(f(m))+f(m)=f(0)+f(3m)+2014$$by $P(m,0)$. $\textbf{Claim:}$ $f$ is injective $\textbf{Proof)}$ Assume that $f(a) = f(b)$, then by $P(a,a), P(b,b)$ we have that $$c+2014+f(3a) = f(f(a))+f(a) = f(f(b))+f(b) = c+2014+f(3b) $$and consequently $$f(3^sa)=f(3^sb)$$for all $s \in \mathbb{Z}_{\geq 0}$, then by PHP on pairs $(x,y) \in \mathbb{Z}/c\mathbb{Z} \times \mathbb{Z}/c\mathbb{Z}$ we have that there is a pair $(m,n) \in \mathbb{N}^2$ with $m > n$ such that $$3^ma \equiv 3^na \pmod{c}$$and $$3^mb \equiv 3^nb \pmod{c}$$then notice that if we write $3^ma = a'c+3^na$ and $3^mb = b'c+3^nba$ We have that $$f(3^na)+2014a' = f(a'c+3^na) = f(3^ma) = f(3^mb) = f(b'c+3^nb)=f(3^nb)+2014b'$$meaning that $a'=b'$ and consequently $3^{m-n}(a-b) = 0$ meaning that $a=b$, as desired. $\square$ Now, notice that by $P(m,m)$ that $$f(f(m)+m) = f(3m)+2014 = f(3m+c)$$and consequently $f(m) = 2m + c$ for all $m \in \mathbb{Z}$ using the fact that $f$ is injective. Going back to the initial assertion, we have that $f(m) = 2m+1007$ is the only solution. $\blacksquare$
03.12.2021 13:27
Let $P(m,n)$ denote $f(f(m)+n)+f(m)=f(n)+f(3m)+2014$. Lemma: There exists a constant $D$ for which if $f(x)=f(y)$, then $|x-y| \le D$. Proof: Note \[ P(0,n): \quad f(n+f(0))=f(n)+2014.\]Let $g:\mathbb{Z}\to \mathbb{Q}$ be defined by $g(x) =f(x)- \tfrac{2014}{f(0)}n$, so basically we remove the linear growth from the above equation and get $g(n+f(0))=g(n)$. Hence $g$ is periodic, so it is bounded. So now for any $x,y$, we have $|g(x)-g(y)|\le C$ for some constant $C$. So $|f(x)-f(y)-\tfrac{2014}{f(0)}(x-y)| \le C$. So if $f(x)=f(y)$, then $|x-y|$ is bounded above by a constant. $\blacksquare$ If $f(a)=f(b)$ for some $a\not=b$, then by $P(a,n)$ and $P(b,n)$ that $f(3a)=f(3b)$, so $f(9a)=f(9b)$, etc., so $f(3^\ell a)=f(3^\ell b)$ for any $\ell$. This contradicts the Lemma by making $\ell$ arbitrarily large. Hence $f(a)=f(b)$. So $f$ is injective. Now a simple cancellation trick finishes the problem: $P(m,3m-f(m))$ gives $f(m)=f(3m-f(m))+2014$, which is equal to $f(3m-f(m)+f(0))$, so by injectivity, $m=3m-f(m)+f(0)$, so $f(m)=2m+f(0)$. Now plugging this into $P(m,n)$ gives $f(x)=2x+1007$, which works.
23.06.2022 19:23
We claim that $f(n)=2n+1007.$ This clearly works. Hence we show there are no more functions. Denote the assertion by $P(m,n).$ $P(0,n-f(0))$ implies $f(n)=f(n-f(0))+2014.$ Then $P(f(0),n-f(0))$ implies $f(n+2014)=f(n)+4028.$ By induction $V(n,k): f(n+2014k)=f(n)+4028k.$ Lemma: $f(x+u)=f(x)+v\implies 2u=v.$ Proof. Note that $V(0,u)$ gives $f(2014u)=f(0)+4028u.$ Induction on $f(x+u)=f(x)+v$ gives $f(x+cu)=f(x)+cv.$ Thus $f(2014u)=f(0)+2014v.$ This finishes. $\blacksquare$ By the lemma, $f(3n)+2014=3f(m).$ By induction, $f(3^cn)+1007(3^c-1)=3^cf(n).$ Set $c=\phi (1007)$ so that $f(3^cn)=f(n)+2(3^c-1)n.$ Combining we are done.
24.06.2022 06:04
Solution without Euler. Rewrite the equation as $f(n+f(x)) = f(n) + (f(3x)-f(x)+2014)$. Thus, by easy induction, we have that for any integer $k$, $$f(n+kf(x)) = f(n) + k(f(3x)-f(x)+2014).$$Now, plug in $k=f(y)$ and do the symmetry bump, we get that $$f(x)(f(3y)-f(y)+2014) = f(y)(f(3x)-f(x)+2014)$$for any $x,y$. Thus, there exists a rational constant $c$ such that $f(3x)-f(x)+2014 = cf(x)$ for some constant $c$. In particular, if we take $x$ such that $f(x)\ne 0$, we must have $f(x) = cx+O(1)$. Plugging this back into the equation, we see that $3cx - cx + O(1) = c^2x$, or $c=2$ after taking $x\to\infty$. Therefore, $f(3x) = 3f(x)+2014$ for all $x$. Plugging in $x=0$ yields that $f(0)=1007$. Now, setting $g(x)=f(x)-2x-1007$, we see that $g(n+f(m)) = g(n)$ and $g(3n)=3g(n)$ for all $m,n$. The first equation implies that $g$ is bounded. However, if $g(x)\ne 0$ for some $x$, then $g(3^Mx) = 3^Mg(x)$, which is not bounded, a contradiction. Thus, the only possibility is that $g(x)\equiv 0$, or $f(x)=2x+1007$ for all $x$.
07.07.2022 15:09
The only solution is $\boxed{f(n)=2n+1007}$, which works. We now prove it's the only solution. Let $f(0) = a$ and $P(m,n)$ denote the given assertion. $P(0,n): f(n+a) = f(n)+2014$. Repeatedly applying this gives $f(n+ka) = f(n)+2014k$ for any positive integers $n$ and $k$. So $f(ka) = a+2014k$. Note that $f(a^2) = 2015a$ and $f(3a^2) = 6043a$. So $P(a^2,n): f(n+2015a) + 2015a = f(n)+6043a+2014$. Now, $f(n+2015a) = f(n)+2014\cdot 2015$. Hence $2014\cdot 2015 + 2015a = 6043a+2014$. So $2014\cdot 2015 - 2014 = 2014 ^2 = 4028a$, so $a=1007$. Now we write $g(n) = f(n)-1007$. Note that $g(n+1007) = f(n+1007) - 1007 = f(n)+1007 = g(n)+2014$. So \begin{align*} g(g(m)+n+1007) + g(m)+1007 = g(n)+1007 +g(3m)+1007 + 2014 \\ g(g(m)+n)+2014 + g(m)= g(n) + g(3m) + 1007 + 2014 \\ g(g(m)+n) + g(m) = g(n)+g(3m) \\ \end{align*}and also $g(0)=0$. Setting $n=0$, we get $g(g(m))+g(m) = g(3m)$. So $g(g(m)+n) + g(m) = g(n) + g(g(m)) + g(m)$, which implies \[g(g(m)+n) = g(g(m))+g(n)\] Claim: $g(kg(m)) = kg(g(m))$ for any positive integers $k$ and $m$. Proof: We induct with base case $k=1$. If $g((k-1)g(m)) = (k-1)g(g(m))$, then we have \[g(g(m)+(k-1)g(m)) = g(g(m)) + (k-1)g(g(m)),\]so $g(kg(m)) = kg(g(m))$, which completes the induction. $\square$ So $1007g(g(m)) = g(1007g(m)) = 2014g(m)$, so $g(g(m)) = 2g(m)$. Thus, $g(3m) = g(g(m))+g(m) = 3g(m)$. Let $k=\phi(1007)$. Note that since $g(n+1007) = g(n)+2014$, we have $g(n+1007d) = g(n)+2014d$ for any positive integer $d$. We have \[3^k g(n) = g(3^k \cdot n) = g\left(n + \frac{(3^k-1)n}{1007} \cdot 1007\right) = g(n) + \frac{(3^k-1)n}{1007}\cdot 2014=g(n)+2n(3^k-1)\implies g(n)=2n, \]so $f(n)=2n+1007$.
07.07.2022 20:41
Why $f(x)=\dfrac{1}{\sin x}$ is not periodic? (as says Evan Chen) We have that $f(x+2\pi) = \dfrac{1}{\sin (x+2\pi)} = \dfrac{1}{\sin x} = f(x)$ Could someone explain this?
09.12.2022 07:14
The solution is $f(n)=2n+1007$ only, which clearly works. Lemma: Let $a,b,c,d$ be fixed integers. If a function $f: \mathbb{Z} \to \mathbb{Z}$ satisfies \[f(n+a)=f(n)+b \text{ and } f(n+c)=f(n)+d\]for all integers $n$, then $\frac{b}{a}=\frac{d}{c}$ (this also holds for domain $\mathbb{R}$, with the additional constraint that $f$ is bounded on some interval) Proof: It follows that $f(n+ac)=f(n)+bc$ and $f(n+ac)=f(n)+ad$, which implies $bc=ad$ as desired. Now, we can rewrite the given as $f(n+f(m))=f(n)+f(3m)-f(m)+2014$. So by the lemma, $\frac{f(3m_1)-f(m_1)+2014}{f(m_1)}= \frac{f(3m_2)-f(m_2)+2014}{f(m_2)}$, for any integers $m_1,m_2$ i.e $\frac{f(3m)-f(m)+2014}{f(m)}$ is a constant independent of $m$. Let us call this constant $c$. We may now write the equation as \begin{align} f(n+f(m))=f(n)+cf(m) \\ f(3m)=(c+1)f(m)-2014 \end{align}Substituting $n=2f(m)$ and $n=f(m)$ into equation $1$ yields \begin{align*} f(3f(m))=f(2f(m))+cf(m) \\ f(2f(m)) = f(f(m)+cf(m) \end{align*}Hence, $f(3f(m))= (c+1)f(f(m))-2014 = f(f(m)) + 2cf(m) \implies cf(f(m))=2cf(m)+2014$. On the other hand from equation $1$, \[f(0)=(c+1)f(0) - 2014 \implies cf(0)=2014 \implies cf(f(m)) = 2cf(m) + cf(0) \implies f(f(m)) = 2f(m) + f(0)\]Comparing this to equation $1$ with $n=0$, we find that $c=2$. From this we also get $f(0)=1007$. Next, we introduce a new function $g(n)=f(n)-2n$. We can write equation $1$ as \[f(n+f(m))-2f(m)-2n=f(n)-2n \implies g(n+f(m))=g(n)\]Substituting $m=0$ gives $g(n+1007)=g(n)$. Equation $2$ can also be rewritten as \[f(3m)-6m=3f(m)-6m-2014 \implies g(3m)=3g(m)-2014\] Since $g$ is periodic, it is bounded, so it has a maximum $P$ and minimum $p$. Note that the new equation $2$ implies $3P-2014 \leq P \implies P \leq 1007$. However, $3p-2014 \geq p \implies p \geq 1007$. This is impossible unless $p=P=1007$, so $g(n)=1007$ for all $n$. Hence, $f(n)=2n+1007$ for all $n$ and we are done
27.12.2022 06:06
Slave wrote: Why $f(x)=\dfrac{1}{\sin x}$ is not periodic? (as says Evan Chen) We have that $f(x+2\pi) = \dfrac{1}{\sin (x+2\pi)} = \dfrac{1}{\sin x} = f(x)$ Could someone explain this? I misspoke slightly. Would be more accurate to say, it's not a function because $f(0)$ is not defined.
07.05.2023 08:25
Denote the assertion with $P(m, n)$. Note that by $P(0, n)$ it follows that \[ f(f(0) + n) = f(n) + 2014 \] Then, by $P(m + f(0)^2, f(n))$ it follows that \[ 2014^2 + 2014f(0) = 3 \cdot 2014f(0) \]so $f(0) = 1007$. Let $g(x) = f(x) - 2x - 1007$ such $g(0) = 0$, $g(x + 1007) = g(x)$ and \[ g(g(m) + 2m + n) - g(n) = g(3m) - 3g(m) \]Thus, either $1007 \mid g(m) + 2m$ in which case $g(3m) - 3g(m) = 0$, else \[ g(k(g(m) + 2m) + n) - g(n) = k(g(3m) - 3g(m)) \]which since the range of $g$ is bounded implies $g(3m) - 3g(m) = 0$. Thus, \[ g(g(m) + 2m + n) = g(n) \] Then, one of $g(1) + 2$, $g(1) + 6$, and $g(1) + 18$ is relatively prime with $1007$. Let this number be $k$. Then $g(x) = g(x + k) = \dots$ gives that $g$ is constant and $0$, thus $f(x) = 2x + 1007$.
07.05.2023 08:27
amuthup wrote: Equating the right sides of the two above equations, we obtain $f(3m)=3f(m)-2014,$ as needed. $\blacksquare$ Now, since $\{1,3,3^2,\dots\}$ forms a complete residue system modulo $1007$ and we have $f(m+1007)=f(m)+2014)$ for all $m,$ we must have that $f$ is linear. From here, it is easy to check that the claimed solution is the only one. Don't think this actually holds as $1007 = 19 \cdot 53$, but since $3$ is a primitive root for both this should just split into four cases
25.05.2023 23:44
Note that $f(f(m)+n)-f(n)=f(3m)-f(m)+2014$, which we will denote $P(m,n)$, which implies $f(kf(m)+n)-f(n)=k(f(3m)-f(m)+2014)$. Let $f(0)=c$ then $P(0,n)$ gives $f(n+c)-f(n)=2014$. Thus, \[2014f(m)=f(cf(m)+n)-f(n)=c(f(3m)-f(m)+2014)\]We will find $c$. Note that $P(m+c,n)$ gives \[f(f(m)+n+2014)-f(n)=f(3m)-f(m)+3\cdot 2014=f(f(m)+n)-f(n)+2\cdot 2014\]Since $f(m)+n$ reaches all reals, $f(n+2014)=f(n)+2014$ generally. We have $f(2014c)=c+4028c$ from the previous, but $f(n+c)-f(n)=2014$ gives $c+2014^2$ which implies $c=1007$. Thus, we have $2f(m)=f(3m)-f(m)+2014$, implying $f(3m)=3f(m)-2014$. We have from induction \[f(a3^k)=3^kf(a)-c(3^k-1)\]We can set $k$ such that $3^k=cb+1$ then $f(a+abc)=(bc+1)f(a)-bc^2$. However, $f(a+(ab)c)=f(a)+2abc$ so $bcf(a)=bc^2+2abc$ implying $f(a)=c+2a$. This works, so we done.
26.05.2023 23:43
Let $P(x,y)$ be the assertion \[f\big(f(m)+n\big)+f(m)=f(n)+f(3m)+2014\] Let $c=f(0)$ and $d=2014$. $P(0,n)\implies f(n+c)=f(n)+d$ so $f(cn)=c+dn$. In particular $f(kc^2)=(kd+1)c$ whenever $k\in\mathbb Z$. \begin{align*} P(c^2,0)&\implies f(f(c^2))+f(c^2)=c+f(3c^2)+d\\ &\implies f((d+1)c)+(d+1)c=c+c+3dc+d\\ &\implies c+d(d+1)+c+dc=c+c+3dc+d\\ &\implies d^2=2dc\\ &\implies c=\frac{d}{2}=1007.\\ \end{align*} Now let us define function $g(n)\colon\mathbb Z\to\mathbb Z$ by $g(n)\doteqdot f(n)-1007$. Then $$g(n+1007)=f(n+1007)-1007=f(n)+2014-1007=g(n)+2014.$$ This implies that \begin{align*} &g(g(m)+n+1007)+1007+g(m)+1007=g(n)+1007+g(3m)+1007+2014\\ &\implies g(g(m)+n+1007)+g(m)=g(n)+g(3m)+2014\\ &\implies g(g(m)+n)+g(m)+2014=g(n)+g(3m)+2014\\ &\implies g(g(m)+n)+g(m)=g(3m)+g(n).\\ \end{align*} By induction $g(kg(m)+n)=k(g(3m)-g(m))+g(n)$ for every $k\in\mathbb Z$. Substituting $k=1007$ implies that $$1007(g(3m)-g(m))+g(n)=g(1007g(m)+g(n))=2014g(m)+g(n).$$ Hence $g(3m)-g(m)=2g(m)$, or $g(3m)=3g(m)$ for all $m\in\mathbb Z$. Since $\gcd(3,1007)=1$ and by Euler's theorem, for $t\doteqdot\varphi(1007)$ we have $3^t-1=1007u$ for some $u\in\mathbb N$, so $$(1+1007u)g(m)=3^tg(m)=g(3^tm)=g(m+1007um)=g(m)+2014um.$$$$\implies 1007ug(m)=2014um.$$ Therefore $g(m)=2m$ or $\boxed{f(n)=2n+1007\quad\forall n\in\mathbb Z}$, which works.
27.05.2023 12:05
This may be a more elegant way to formulate the solution above. Our functional equation is $$f\big(f(m)+n\big)+f(m)=f(n)+f(3m)+2014\qquad(1)$$Let $c=f(0)$. With $m=0$ in (1) we have $$f(n+c)=f(n)+2014\qquad(2)$$Moreover, by easy induction and (1), we have that for any integer $k$, $$f(kf(m)+n) = f(n) + k(f(3m)-f(m)+2014)\qquad(3)$$Choosing $k=c$ in (3) and using (2) we have $$f(n)+2014f(m)=f(n)+c(f(3m)-f(m)+2014)$$Thus, $$2014f(m)=c(f(3m)-f(m)+2014)\qquad(4)$$Choosing $m=c$ in (4) implies $$2014f(c)=c(f(3c)-f(c)+2014)$$Now, (2) implies that $$2014(c+2014)=c(f(c)+4028-f(c)+2014)=3\cdot 2014c$$or $$c+2014=3c.$$Hence $2c=2014$ so $c=1007$. By (2) we have $$f(n+1007)=f(n)+2014\qquad(5)$$Moreover, by (4) we have $$2014f(m)=1007(f(3m)-f(m)+2014)$$or $$2f(m)=f(3m)-f(m)+2014$$or $$f(3m)=3f(m)-2014\qquad(6)$$Now define function $g(n)\colon\mathbb Z\to\mathbb Z$ by $g(n)\doteqdot f(n)-1007$. Then (5) implies that \begin{align*} g(n+1007)&=f(n+1007)-1007\\ &=f(n)+2014-1007\\ &=f(n)-1007+2014\\ &=g(n)+2014. \end{align*}Thus, $$g(n+1007)=g(n)+2014\qquad(7)$$Moreover, (6) implies that \begin{align*} g(3m)&=f(3m)-1007\\ &=3f(m)-2014-1007\\ &=3(f(m)-1007)\\ &=3g(m). \end{align*}Thus, $$g(3m)=3g(m)\qquad(8)$$Since $\gcd(3,1007)=1$ and by Euler's theorem, for $t\doteqdot\varphi(1007)$ we have $3^t-1=1007u$ for some $u\in\mathbb N$. Hence, and by using (7) and (8) we have \begin{align*} (1+1007u)g(m)&=3^tg(m)\\ &=g(3^tm)\\ &=g(m+1007um)\\ &=g(m)+2014um. \end{align*}This implies that $$1007ug(m)=2014um$$or $$g(m)=2m$$or $\boxed{f(n)=2n+1007\quad\forall n\in\mathbb Z}$, which works.
01.06.2023 14:27
06.03.2024 06:45
Hope this actually works lol. This wasn't actually hard just so many individual steps leading upto the sol. The answer is $f(n)=2n+1007$ for all $n\in \mathbb{Z}$ . It’s easy to see that these functions satisfy the given equation. We now show these are the only solutions. We first show the following. Claim : For all integers $n$ we have, \[f(n+2014)=f(n)+2\cdot 2014\]Proof : First, let $f(0)=c$. Then, $P(0,n)$ gives \[f(n+c)=f(n)+2014\]for all $n \in \mathbb{Z}$. From which it follows that $f(c)=c+2014$ and $f(3c)=c+3\cdot 2014$. Now, looking at $P(c,n)$ yields, \begin{align*} f(f(c)+n)+f(c)&=f(n)+f(3c)+2014\\ f(n+c+2014) + c + 2014 &= f(n) + c + 4 \cdot 2014\\ f(n+2014) + c + 2\cdot 2014 &= f(n) + c + 4\cdot 2014\\ f(n+2014) &= f(n) + 2 \cdot 2014 \end{align*}as claimed. This allows us to pin down $f(0)$. Claim : $f(0)=1007$. Proof : Assume that $f(0)=c\neq 2017$. Then, \[f(n+2c)=f(n)+2\cdot 2014 = f(n+2014)\]using our previous claims. Thus, it follows that $f$ is periodic with period $T=|2c-2014|\neq 0$. But then, \[f(n)+T \cdot 2\cdot 2014 = f(n+2014\cdot T)=f(n)\]the first using our previous claim, and the second equality using the fact that $T$ is the period of this function. But this is clearly impossible since $T\neq 0$ which is a contradiction. Thus, it follows that $f(0)=1007$ as desired. Now, we have \[ f(n+1007)=f(n)+2014 \qquad (1) \]for all integers $n$. This then leads to the following very important claim. Claim : The function $f$ is injective. Proof : Say we have $f(\alpha)=f(\beta)$ for some $\alpha \neq \beta \in \mathbb{Z}$. Then, $P(\alpha,n)$ and $P(\beta,n)$ yields, \[f(n)+f(3\alpha)+2014 = f(f(\alpha)+n)+f(\alpha)=f(f(\beta)+n)+f(\beta)=f(n)+f(3\beta)+2014\]from which it follows that $f(3\alpha)=f(3\beta)$. A simple induction then yields that $f(3^r\alpha)=f(3^r\beta)$ for all positive integers $r$. Considering, $r=\phi(1007)$ we have that \[f(3^{\phi(1007)}\alpha)=f(3^{\phi(1007)}\beta)\]By Euler's generalization of Fermat's Little Theorem, we have that $3^{\phi(1007)}\equiv 1 \pmod{1007}$ which implies that $3^{\phi(1007)}\alpha=\alpha+1007 \cdot k_\alpha$ for some $k_\alpha \in \mathbb{Z}$. Similarly, $3^{\phi(1007)}\beta=\beta+1007 \cdot k_\beta$ for some $k_\beta \in \mathbb{Z}$. Now, using $(1)$, we can rewrite this as, \[f(\beta)+\frac{3^{\phi(1007)}\beta - \beta}{1007} \cdot 2014 = f(3^{\phi(1007)}\beta) = f(3^{\phi(1007)}\alpha) = f(\alpha)+\frac{3^{\phi(1007)}\alpha-\alpha}{1007} \cdot 2014\]which with some manipulation leads to \[\left(3^{\phi(1007)}-1\right)(\alpha - \beta)=0\]which is clearly impossible since $3^{\phi(1007)}>1$ and $\alpha \neq \beta$. Thus, there exists no such $\alpha,\beta \in \mathbb{Z}$ and indeed $f$ is injective as desired. Now, simply look at $P(m,3m-f(m))$. This gives us that \begin{align*} f(f(m)+3m-f(m))+f(m) &=f(3m-f(m))+f(3m)+2014\\ f(m) &= f(3m-f(m))+2014\\ f(m) &= f(3m-f(m)+1007) \end{align*}where the last equality was obtain using $(1)$. Now, since $f$ is injective it follows that \[m=3m-f(m)+1007 \implies f(m)=2m+1007\]for all $m \in \mathbb{Z}$ which was the desired answer.
31.08.2024 08:28
The answer is $f(x) = \boxed{2x+1007}$, which works. Suppose that $c=f(0)$, and denote the given assertion as $P(m,n)$. Notice $P(0,n)$ gives \[f(n+c) = f(n)+2014.\] Now, $P(c,n)$ gives \[f(f(c)+n)+f(c) = f(n)+f(3c) + 2014.\] However, observe that we can recursively evaluate that $f(kc) = c+2014k$, so we plug this into our equation to get \begin{align*} &\phantom{\implies} f(c+2014+n) + c+ 2014 = f(n) + c+3 \cdot 2014 + 2014 \\ &\implies f((n+2014)+c) = f(n) + 3 \cdot 2014 \\ &\implies f(n+2014) = f(n) + 4028. \end{align*} Suppose that $c\neq 1007$. Then, notice that \[f(n+2c) = f(n)+4028 = f(n+2014).\] Thus, $f$ is periodic with period $p = |2014-2c|$. This means \[f(n)+4028p = f(n+2014p) = f(n),\] a contradiction as $p \neq 0$. Hence, our original assumption that $c \neq 1007$ is false, so $c=1007$. Plugging this in yields \[f(n+1007) = f(n)+2014.\] Claim: $f$ is injective Proof: Suppose that there are two integers $a,b$ such that $f(a)=f(b)$ and $a \neq b$. Comparing $P(a,n)$ and $P(b,n)$ gives \[f(n)+f(3a)+2014 = f(n)+f(3b)+2014 \implies f(3a) = f(3b),\] and applying it repeatedly yields $f(3^ka) = f(3^kb)$. Now, suppose that $k = \varphi(1007)$. Note that $3^{\varphi(1007)} \equiv 1 \pmod{1007}$, so \[f(a) + 2014 \left(\frac{(3^k-1)a}{1007} \right) = f(3^ka) = f(3^kb) = f(b)+2014 \left(\frac{(3^k-1)b}{1007} \right).\] Simplifying this yields $a = b$, a contradiction. $\square$ Finally, $P(m,3m-f(m))$ yields \[f(m) = f(3m-f(m))+2014 = f(3m-f(m)+1007).\] Due to injectivity, we have $m = 3m-f(m)+1007$, which rearranges to $f(m) = 2m+1007$, as desired.
05.09.2024 15:41
Let $f(0)=a$ then \begin{align*} f(k\cdot a) & =f((k-1)\cdot a+f(0)) \\ & =f((k-1)\cdot a)+f(3\cdot 0)-f(0)+2014 \\ & = f((k-1)\cdot a)+2014.\end{align*}So, by induction it follows that $f(k\cdot a)=a+2014k$. Now put $m=a^2,n=a$ into the equation, we get $$f(a+2014a+a)+a+2014a=a+2014+a+2014\cdot 3a+2014 \Rightarrow \ a+2016\cdot 2014+2015a=2a+2014\cdot 3a+2\cdot 2014 \Rightarrow \ a=1007.$$Now putting $m=0$ we get $f(n+1007)=f(n)+2014$. Let $f(x)=g(x)+1007$ then we have \begin{itemize} \item g(0)=0 \item g(n+1007)=g(n)+2014 \item g(g(x)+y)+g(x)=g(y)+g(3x) \qquad (1). \end{itemize} By induction we get $g(kg(x))=k(g(3x)-g(x))$. So, $$g(g(3x)-g(x))=g(g(g(x)))=g(3g(x))-g(g(x))=2(g(3x)-g(x)).$$Putting $(x,y)\mapsto (3x,-g(x))$ in $(1)$ we find that $4g(3x)=g(9x)+3g(x)$. Also putting $(x,y)\mapsto (3x,3g(x)-g(3x))$ into $(1)$ and simplifying we will find $$g(3g(x)-g(3x))=0 \qquad (2)$$ Suppose $g(t)=0$ for some $t\neq 0$, then $g(3t)=0$ too, from $(1)$. So, $g(3^k t)=0$ for all $k>0$ integer. Take a $k$ such that $3^kt\equiv t \pmod{1007}$. Say $3^kt=t+1007q$ then $$g(3^k t) = g(t+1007q)=g(t)+2014q$$by induction. But this implies that $2014q=0$, a contradiction. Thus it follows that $t=0$. Now, applying this result to $(2)$ we get $g(3x)=3g(x)$ for all $x$. So $g(3^k x)=3^k g(x)$. Now we just use the same trick again. Take $k$ such that $3^k y=y+1007q$ for some $q$. So, $$3^k g(y)=g(3^k y)=g(y)+2014 q \implies g(y)=2\frac {1007q}{3^k-1}=2y.$$Thus $g(y)=2y$ for all $y$. This clearly works.
05.09.2024 21:57
The only solution is $f(x)=2x+1007$. First, \begin{align*} P(0, n) &\implies f(f(0)+n)=f(n)+2014 \hspace{0.1cm}(\$) \\ &\implies f(nf(0))=f((n-1)f(0))+2014 \\ &\implies f(nf(0))=f(0)+2014n \hspace{0.1cm} (*) \text{ by induction}. \end{align*}Then \begin{align*} P(f(n), 0) &\implies f(n+2014)=f(n)+4028 \\ &\implies f(2014f(0)+n)=f(n)+4028f(0) \end{align*}by induction as well. However, by $(*)$, we also have $f(2014f(0)+n)=f(0)+2014^2$. It follows that $f(0)=1007$. Now, $(\$)$ becomes $f(n+1007)=f(n)+2014 \implies f(n+1007k)=f(n)+2014k$. Additionally, $P(m, 0) \implies f(f(m))+f(m)=f(3m)+3021 \hspace{0.1cm} (\times)$. We will now prove $f$ is injective. From $(\times)$, if $f(a)=f(b)$, then $f(3a)=f(3b)$, and by induction, $f(3^k a)=f(3^k b)$ for positive integers $k$. Letting $k=\varphi (1007)$, by Euler's Theorem, $$\frac{3^{\varphi (1007)}}{1007} \in \mathbb{Z}$$. Then \begin{align*} f(3^{\varphi (1007}a)&=f(a+1007(\frac{3^{\varphi (1007)}-1}{1007}a)) \\ &=f(a)+2014 \cdot \frac{3^{\varphi (1007)}-1}{1007}a. \end{align*}Similarly, \begin{align*} f(3^{\varphi (1007}a)&=f(3^{\varphi (1007)}b) \\ &=f(b+1007(\frac{3^{\varphi (1007)}-1}{1007}b)) \\ &=f(b)+2014 \cdot \frac{3^{\varphi (1007)}-1}{1007}b \\ &=f(a)+2014 \cdot \frac{3^{\varphi (1007)}-1}{1007}a \\ &\implies a=b, \end{align*}proving $f$ is injective. Finally, $P(m, m) \implies f(f(m)+m)=f(3m)+2014=f(3m+1007)$. Now, by injectivity, $f(m)+m=3m+1007 \implies f(m)=2m-1007$, finishing the proof.
17.01.2025 15:07
Cool FE; unfortunately I made a massive calculation blunder in the middle of the solution and screwed up majorly; here’s the solution I got but patched up. (edit: I thought the argument for Claim 0 was neat and original enough to warrant a post but it seems the solution in the shortlist uses the exact same argument ) We claim that the answer is $n\to 2n+1007$, and let $P(m,n)$ denote the equation in question; I will not verify the function as others have already done so. Let $2c=2014$. The following claim is the workhorse of the entire solution Claim 0: $f(m)(f(3n)+2014)=f(n)(f(3m)+2014)$ Let $g(m)=f(3m)-f(m)+2c$ first as in the official solutions. Notice then that $P(m,n)$ rewrites to $f(f(m)+n)=g(m)+f(n)$. Then it is clear by inducting that $f(f(m)t+n)=tg(m)+f(n)$ for any integer $t$, and so compare $f(f(a)f(b)+n)-f(n)$ in the following ways: \begin{align*} f(f(a)f(b)+n)-f(n)=f(b)g(a)=f(a)g(b) \end{align*}Now comparing the two and cancelling gives us exactly what we need. Claim 1: $f(0)=c$ First notice that $g(0)=2014$, so $f(f(0)+n)=f(n)+2014$. Exploit this to compute the following: \begin{align*} f(f(0))&=f(0)+2014\\ f(3f(0))&=f(0)+3\cdot2014 \end{align*}Plug $m=0$ and $n=f(0)$ into Claim 0 to get $f(f(0))(f(0)+2014)=f(0)(f(3f(0))+2014)$, or after expanding the nested $f$’s, $(f(0)+2014)^2=f(0)(f(0)+4\cdot2014)$, which after further expanding collapses to $2\cdot2014f(0)=2014^2$ or $f(0)=1007=c$ as desired. Claim 2: $f(3m)=3f(m)-2c$ Notice now that if we plug $n=0$ into Claim 0, then we have that $f(0)(f(3m)+2c)=f(m)(f(0)+2c)$, or $c(f(3m)+2c)=3cf(m)$, which further reduces down to $f(3m)=3f(m)-2c$, as desired. Claim 3: $f(f(m)+n)=f(n)+2f(m)$ Well by Claim 2 we have that $g(m)=f(3m)-f(m)+2=c=2f(m)$ as desired, so plug it back into $P(m,n)$ to get Claim 3. Claim 4: $f$ is essentially determined on $[0,c-1]$ This is obvious by Claim 3 using $m=0$. Claim 5: $f(3^km)=3^kf(m)-\left(\frac{3^k-1}{3-1}\right)2c=3^kf(m)-(3^k-1)c$ for all positive integers $k$. This follows by repeatedly using Claim 2 and inducting. Now let $k=\phi(1007)=936$. We then get $f(3^km)=f(m+m(3^k-1))=f(m)+2m(3^k-1)=3^kf(m)-(3^k-1)c$. We thus can finally claim to solve the functional equation as then $(3^k-1)f(m)=(3^k-1)(2m+c)$ so $f(m)=2m+c$ as desired. Thus after 6 claims we have instacooked the question.
Edit: someone please get me back onto combinatorics grind