Maths Olympiad Prep

Library / /5 of 9

, 2025

Algebra Difficulty 8.7 Shortlist Prove it China

Find all functions f:ZZf : \mathbb{Z} \to \mathbb{Z} satisfying:
(1) For any positive integer MM, there exists an integer kk with f(k)M|f(k)| \ge M;
(2) For any integers m,nm, n,
2f(m)f(n)f(mn)12f(m)f(n) - f(m - n) - 1 is a perfect square.

Solution

Let α=3+22\alpha = 3 + 2\sqrt{2}. All functions satisfying the given conditions are of the form f(n)=12(α2n+α2n)f(n) = \frac{1}{2}(\alpha^{2n} + \alpha^{-2n}) for some fixed positive integer tt.

First, we verify that such f(n)f(n) satisfies ()(\star). The left-hand side of ()(\star) becomes:
2α2tm+α2tm2α2tn+α2tn2α2t(mn)+α2t(mn)21=α2t(m+n)+α2t(m+n)21=(αt(m+n)αt(m+n)2)2. 2 \cdot \frac{\alpha^{2tm} + \alpha^{-2tm}}{2} \cdot \frac{\alpha^{2tn} + \alpha^{-2tn}}{2} - \frac{\alpha^{2t(m-n)} + \alpha^{-2t(m-n)}}{2} - 1 \\ = \frac{\alpha^{2t(m+n)} + \alpha^{-2t(m+n)}}{2} - 1 = \left( \frac{\alpha^{t(m+n)} - \alpha^{-t(m+n)}}{\sqrt{2}} \right)^2 .
Note that αt(m+n)αt(m+n)2=(3+22)t(m+n)(322)t(m+n)2\frac{\alpha^{t(m+n)} - \alpha^{-t(m+n)}}{\sqrt{2}} = \frac{(3+2\sqrt{2})^{t(m+n)} - (3-2\sqrt{2})^{t(m+n)}}{\sqrt{2}} is an integer, so the above expression is indeed a perfect square.

We now show that these are the only solutions to the functional equation ()(\star). Let Am,nA_{m,n} be the non-negative integer such that:
2f(m)f(n)f(mn)1=Am,n2.() 2f(m)f(n) - f(m - n) - 1 = A_{m,n}^2. \qquad (\star\star)

Step 1: All f(n)f(n) have the same sign. This follows by setting n=0n = 0 in ()(\star\star), which gives (2f(0)1)f(m)>0(2f(0) - 1)f(m) > 0. Thus, all f(n)f(n) have the same sign as 2f(0)12f(0) - 1.

Step 2: f(n)f(n) is an even function. For a fixed tZ+t \in \mathbb{Z}^+, let Mt=max{f(t),f(t)}M_t = \max\{|f(t)|, |f(-t)|\}. Since ff is unbounded, there exists NN such that f(N+t)>(Mt+1)2|f(N + t)| > (M_t + 1)^2. Substituting m=N+t,n=Nm = N + t, n = N and m=N,n=N+tm = N, n = N + t into ()(\star\star) yields:
2f(N+t)f(N)f(t)1=AN,N+t2,2f(N+t)f(N)f(t)1=AN+t,N2. 2f(N + t)f(N) - f(t) - 1 = A_{N,N+t}^2, \quad 2f(N + t)f(N) - f(-t) - 1 = A_{N+t,N}^2.
This implies AN,N+t2>2(Mt+1)2Mt1>Mt2A_{N,N+t}^2 > 2(M_t+1)^2 - M_t - 1 > M_t^2, so AN,N+t>MtA_{N,N+t} > M_t; similarly, AN+t,N>MtA_{N+t,N} > M_t. Subtracting these equations gives:
f(t)f(t)=(AN,N+tAN+t,N)(AN,N+t+AN+t,N). f(-t) - f(t) = (A_{N,N+t} - A_{N+t,N})(A_{N,N+t} + A_{N+t,N}).
The left-hand side satisfies f(t)f(t)<2Mt|f(-t) - f(t)| < 2M_t, while AN,N+t+AN+t,N>2MtA_{N,N+t} + A_{N+t,N} > 2M_t. Analyzing the magnitudes shows that AN,N+t=AN+t,NA_{N,N+t} = A_{N+t,N}, so f(t)=f(t)f(t) = f(-t), proving ff is even.

Step 3: Determine the general form of f(n)f(n). Setting m=nm = n in ()(\star\star) gives:
2f(n)2f(0)1=An,n2 i.e., An,n22f(n)2=f(0)1.(5) 2f(n)^2 - f(0) - 1 = A_{n,n}^2 \quad \text{ i.e., } \quad A_{n,n}^2 - 2f(n)^2 = -f(0) - 1. \qquad (5)
Thus, (An,n,f(n))(A_{n,n}, f(n)) is a solution to the generalized Pell equation:
X22Y2=f(0)1.(6) X^2 - 2Y^2 = -f(0) - 1. \qquad (6)
We use the theory of solutions to generalized Pell equations. Let Z[2]\mathbb{Z}[\sqrt{2}] be the ring of numbers Z=X+2YZ = X + \sqrt{2}Y with X,YZX, Y \in \mathbb{Z}. The conjugate of ZZ is Z=X2YZ' = X - \sqrt{2}Y, and (Z1Z2)=Z1Z2(Z_1Z_2)' = Z'_1Z'_2. For α=3+22\alpha = 3+2\sqrt{2}, we have α=α1\alpha' = \alpha^{-1}. Solving (6) is equivalent to solving ZZ=f(0)1ZZ' = -f(0) - 1 in Z[2]\mathbb{Z}[\sqrt{2}]. If ZZ is a solution, then all Zα2sZ\alpha^{2s} (sZs \in \mathbb{Z}) are also solutions.

Lemma: There exist finitely many fundamental solutions Zi=Xi+2YiZ[2]Z_i = X_i + \sqrt{2}Y_i \in \mathbb{Z}[\sqrt{2}] (i=1,,ti = 1, \dots, t) to (6) such that for any solution (X,Y)(X, Y), there exists i{1,,t}i \in \{1, \dots, t\} and sZ0s \in \mathbb{Z}_{\ge 0} with X+2Y=Ziα2sX + \sqrt{2}Y = Z_i\alpha^{2s}.

Proof of Lemma: Consider the lattice L:={(a+2b,a2b)a,bZ}L := \{(a + \sqrt{2}b, a - \sqrt{2}b) \mid a, b \in \mathbb{Z}\}. Solutions (X,Y)(X, Y) to (6) correspond to points (x,y)=(X+2Y,X2Y)(x, y) = (X + \sqrt{2}Y, X - \sqrt{2}Y) on the hyperbola xy=f(0)1xy = -f(0) - 1. Multiplying X+2YX + \sqrt{2}Y by α2\alpha^2 or α2\alpha^{-2} generates new solutions, equivalent to moving (x,y)(x, y) to (α2x,α2y)(\alpha^2x, \alpha^{-2}y) or (α2x,α2y)(\alpha^{-2}x, \alpha^2y) on the hyperbola. By these transformations, any solution can be mapped to a region where xαf(0)+1|x| \le \alpha\sqrt{|f(0) + 1|} and yαf(0)+1|y| \le \alpha\sqrt{|f(0) + 1|}, corresponding to finitely many lattice points (Xi+2Yi,Xi2Yi)(X_i + \sqrt{2}Y_i, X_i - \sqrt{2}Y_i) (i=1,,ti = 1, \dots, t). Thus, any solution can be written as (Xi+2Yi)α2s(X_i + \sqrt{2}Y_i)\alpha^{2s}. \square

Fix the fundamental solutions Zi=Xi+2YiZ_i = X_i + \sqrt{2}Y_i (i=1,,ti = 1, \dots, t) from the lemma, with ZiZi=f(0)1Z_iZ'_i = -f(0) - 1. We may assume no two ZiZ_i differ by a power of α2\alpha^2. For each nZn \in \mathbb{Z}, there exist unique in{1,,t}i_n \in \{1, \dots, t\} and snZs_n \in \mathbb{Z} such that:
f(n)=Zinα2snZinα2sn22.(7) f(n) = \frac{Z_{i_n}\alpha^{2s_n} - Z'_{i_n}\alpha^{-2s_n}}{2\sqrt{2}}. \qquad (7)
Let N=maxi{Zi,Zi,Zi1,Zi1}N = \max_i\{|Z_i|, |Z'_i|, |Z_i|^{-1}, |Z'_i|^{-1}\}. From (7), we have the estimate:
N1α2snNf(n)Nα2sn+N.(8) N^{-1}\alpha^{2|s_n|} - N \le |f(n)| \le N\alpha^{2|s_n|} + N. \qquad (8)

Step 4: For positive integers m>nm > n, we have the growth estimate:
sm+nsm<sn+2logαN+2.(9) \left||s_{m+n} - |s_m|\right| < |s_n| + 2 \log_{\alpha} N + 2. \qquad (9)
This follows from substituting n-n for nn in ()(\star\star), yielding:
f(m+n)<2f(m)f(n)=2f(m)f(n).(10) |f(m+n)| < 2f(m)f(-n) = 2f(m)f(n). \qquad (10)
Combining with (8) gives:
N1α2sm+nN2(Nα2sn+N)(Nα2sm+N). N^{-1}\alpha^{2|s_{m+n}|} - N \le 2(N\alpha^{2|s_n|} + N)(N\alpha^{2|s_m|} + N).
Simplifying, we obtain:
N1α2sm+n2N2((α2sn+1)(α2sm+1)+1)N2α2sn+2sm+3 N^{-1} \cdot \alpha^{2|s_{m+n}|} \le 2N^2 \cdot ((\alpha^{2|s_n|} + 1)(\alpha^{2|s_m|} + 1) + 1) \le N^2 \cdot \alpha^{2|s_n|+2|s_m|+3}
which implies sm+n<sn+sm+2logαN+2|s_{m+n}| < |s_n| + |s_m| + 2 \log_{\alpha} N + 2.
Similarly, substituting m+nm+n for mm in ()(\star\star) gives:
2f(m+n)f(n)>f(m),(11) 2f(m+n)f(n) > |f(m)|, \qquad (11)
leading to sm+n+sn+2logαN+2>sm|s_{m+n}| + |s_n| + 2 \log_{\alpha} N + 2 > |s_m|. Combining these inequalities proves (9).

Step 5: Prove that f(0)=1f(0) = 1.
First, let's explain the basic idea. Suppose for indices m,nm, n we have Zim=ZinZ_{i_m} = Z_{i_n} and sns_n has the same sign as sms_m. Substituting the expressions for f(m)f(m) and f(n)f(n) from (7) into ()(\star\star), we obtain:
Bm,n2=2f(m)f(n)f(mn)1=(Zimα2smZimα2sm)(Zinα2snZinα2sn)4Zimnα2smnZimnα2smn221=(Zimαsm+sn+Zimαsmsn2)2ZimZim(αsmsn+αsnsm)24(Zimnα2smnZimnα2smn)221=(Zimαsm+sn+Zimαsmsn2)2+(f(0)+1)(αsmsn+αsnsm)24(Zimnα2smnZimnα2smn)221. \begin{align} B_{m,n}^2 &= 2f(m)f(n) - f(m-n) - 1 \\ &= \frac{(Z_{i_m} \alpha^{2s_m} - Z'_{i_m} \alpha^{-2s_m})(Z_{i_n} \alpha^{2s_n} - Z'_{i_n} \alpha^{-2s_n})}{4} - \frac{Z_{i_{m-n}} \alpha^{2s_{m-n}} - Z'_{i_{m-n}} \alpha^{-2s_{m-n}}}{2\sqrt{2}} - 1 \\ &= \left( \frac{Z_{i_m} \alpha^{s_m+s_n} + Z'_{i_m} \alpha^{-s_m-s_n}}{2} \right)^2 - \frac{Z_{i_m} Z'_{i_m} (\alpha^{s_m-s_n} + \alpha^{s_n-s_m})^2}{4} \\ &\quad - \frac{(Z_{i_{m-n}} \alpha^{2s_{m-n}} - Z'_{i_{m-n}} \alpha^{-2s_{m-n}})}{2\sqrt{2}} - 1 \\ &= \left( \frac{Z_{i_m} \alpha^{s_m+s_n} + Z'_{i_m} \alpha^{-s_m-s_n}}{2} \right)^2 + (f(0)+1) \frac{(\alpha^{s_m-s_n} + \alpha^{s_n-s_m})^2}{4} \\ &\quad - \frac{(Z_{i_{m-n}} \alpha^{2s_{m-n}} - Z'_{i_{m-n}} \alpha^{-2s_{m-n}})}{2\sqrt{2}} - 1. \tag{12} \end{align}
Note that 12(Zimαsm+sn+Zimαsmsn)\frac{1}{2}(Z_{i_m} \alpha^{s_m+s_n} + Z'_{i_m} \alpha^{-s_m-s_n}) is an integer greater than (2N)1αsm+sn1N(2N)^{-1} \alpha^{|s_m+s_n|-1} - N.
Therefore, if sms_m and sns_n are very close and both have large absolute values, all terms except this squared term sum to zero.
Now we use this property specifically to show f(0)=1f(0) = 1. Assume by contradiction that f(0)1f(0) \neq 1. First, we show that for any i{1,,t}i \in \{1, \dots, t\}, the sets {122Ziα2ssZ0}{122Ziα2ssZ0}\{\frac{1}{2\sqrt{2}}Z_i\alpha^{2s} \mid s \in \mathbb{Z}_{\ge 0}\} \cup \{\frac{1}{2\sqrt{2}}Z'_i\alpha^{2s} \mid s \in \mathbb{Z}_{\ge 0}\} and {14(f(0)+1)α2s}\{\frac{1}{4}(f(0)+1)\alpha^{2s}\} have no common elements. This is because the product of these numbers with their conjugates differs:
122Ziα2s122Ziα2s=f(0)+18116(f(0)+1)2, \frac{1}{2\sqrt{2}} Z_i \alpha^{2s} \cdot \frac{1}{-2\sqrt{2}} Z'_i \alpha^{-2s} = \frac{f(0) + 1}{8} \neq \frac{1}{16} (f(0) + 1)^2,
(since f(0)1f(0) \neq 1). Thus there exists an integer M>2logα(N)+2M > 2 \log_{\alpha}(N) + 2 such that all numbers of the form f(0)+14α2s\frac{f(0)+1}{4}\alpha^{2s} and Zi22α2s\frac{Z_i}{2\sqrt{2}}\alpha^{2s} or Zi22α2s\frac{Z'_i}{2\sqrt{2}}\alpha^{2s} (for sM|s| \ge M) are pairwise separated by more than f(0)1+N2|f(0) - 1| + N^2.
Since ff is unbounded, there exist n1<<n2t+1n_1 < \dots < n_{2t+1} satisfying:
sn1>2M,sni+1>2sni(i=1,,2t). |s_{n_1}| > 2M, \quad |s_{n_{i+1}}| > 2|s_{n_i}| \quad (i = 1, \dots, 2t).
Choose LL such that sL>522t+1M|s_L| > 5 \cdot 2^{2t+1}M. Consider:
iL+n1,iL+n2,,iL+n2t+1{1,,t} i_{L+n_1}, i_{L+n_2}, \dots, i_{L+n_{2t+1}} \in \{1, \dots, t\}
and the signs of sL+njs_{L+n_j}. By the pigeonhole principle, there must exist x>y1x > y \ge 1 such that iL+nx=iL+ny=ii_{L+n_x} = i_{L+n_y} = i and sL+nxs_{L+n_x} has the same sign as sL+nys_{L+n_y}.
From inequality (9), we estimate:
s(L+nx)(L+ny)=snxny>snxsny(2logα(N)+2)>M. |s_{(L+n_x)-(L+n_y)}| = |s_{n_x-n_y}| > |s_{n_x} - s_{n_y}| - (2 \log_{\alpha}(N) + 2) > M.
sL+nx>sLsnx2logα(N)+2>42t+1M;sL+ny>42t+1M. |s_{L+n_x}| > |s_L| - |s_{n_x}| - 2 \log_{\alpha}(N) + 2 > 4 \cdot 2^{t+1}M; \quad |s_{L+n_y}| > 4 \cdot 2^{t+1}M.
Returning to our earlier situation, set m=L+nxm = L + n_x, n=L+nyn = L + n_y, and observe that:
Ziαsm+sn+Ziαsmsn2>N1α42t+1MN \left| \frac{Z_i \alpha^{s_m + s_n} + Z'_i \alpha^{-s_m - s_n}}{2} \right| > N^{-1} \alpha^{4 \cdot 2^{t+1} M} - N
is much larger than the square of the remaining terms. Therefore, we must have:
(f(0)+1)(αsmsn+αsnsm)24=(Zimnα2smnZimnα2smn)22+1. (f(0) + 1) \frac{(\alpha^{s_m - s_n} + \alpha^{s_n - s_m})^2}{4} = \frac{(Z_{i_{m-n}} \alpha^{2s_m - n} - Z'_{i_{m-n}} \alpha^{-2s_m - n})}{2\sqrt{2}} + 1.
But by the definition of MM, this equality cannot hold. Contradiction!

Step 6: Complete the proof. With f(0)=1f(0) = 1, (5) simplifies to:
2f(n)22=An,n2. 2f(n)^2 - 2 = A_{n,n}^2.
Thus, An,nA_{n,n} is even, and we rewrite the equation as:
f(n)22(An,n2)2=1. f(n)^2 - 2 \left( \frac{A_{n,n}}{2} \right)^2 = 1.
The solutions to this standard Pell equation are:
f(n)=αtn+αtn2,tnZ0. f(n) = \frac{\alpha^{t_n} + \alpha^{-t_n}}{2}, \quad t_n \in \mathbb{Z}_{\ge 0}.
Substituting n=0n = 0 into (★) gives:
Am,02=2f(m)f(0)f(m)1=f(m)1=((2+1)tm(21)tm2)2, A_{m,0}^2 = 2f(m)f(0) - f(m) - 1 = f(m) - 1 = \left( \frac{(\sqrt{2} + 1)^{t_m} - (\sqrt{2} - 1)^{t_m}}{\sqrt{2}} \right)^2,
implying tnt_n must be even. Let tn=2snt_n = 2s_n.
Substituting into (10) and (11), we obtain for m>nm > n:
12(α2sm+α2sm)(α2sn+α2sn)>12(α2sm+n+α2sm+n), \frac{1}{2}(\alpha^{2s_m} + \alpha^{-2s_m})(\alpha^{2s_n} + \alpha^{-2s_n}) > \frac{1}{2}(\alpha^{2s_{m+n}} + \alpha^{-2s_{m+n}}),
12(α2sm+n+α2sm+n)(α2sn+α2sn)>12(α2sm+α2sm), \frac{1}{2}(\alpha^{2s_{m+n}} + \alpha^{-2s_{m+n}})(\alpha^{2s_n} + \alpha^{-2s_n}) > \frac{1}{2}(\alpha^{2s_m} + \alpha^{-2s_m}),
which implies:
sm+snsm+nandsm+n+snsm.(13) s_m + s_n \ge s_{m+n} \quad \text{and} \quad s_{m+n} + s_n \ge s_m. \qquad (13)
The following shows that for any N\ell \in \mathbb{N}, we have s=s1s_\ell = \ell s_1. Fix \ell, and let D:=max{2,s1,,s}D := \max\{2, s_1, \dots, s_\ell\}.

Consider any positive integer N>N > \ell satisfying sN>5Ds_N > 5D. From the given conditions, for i=1,0,,1i = -1, 0, \dots, \ell - 1, we have sN+i>4Ds_{N+i} > 4D. For i=0,,1i = 0, \dots, \ell - 1, taking m=N+im = N + i and n=N1n = N - 1 in (12) yields:
BN+i,N12=12(α2sN+i+α2sN+i)(α2sN1+α2sN1)12(α2si+1α2si+1)1=(αsN+i+sN1αsN+isN12)2+(α2sN+2sN1+α2sN12sN+)(α2si+1+α2si+1)2 \begin{aligned} B_{N+i,N-1}^2 &= \frac{1}{2}(\alpha^{2s_{N+i}} + \alpha^{-2s_{N+i}})(\alpha^{2s_{N-1}} + \alpha^{-2s_{N-1}}) - \frac{1}{2}(\alpha^{2s_{i+1}} - \alpha^{-2s_{i+1}}) - 1 \\ &= \left( \frac{\alpha^{s_{N+i}+s_{N-1}} - \alpha^{-s_{N+i}-s_{N-1}}}{\sqrt{2}} \right)^2 \\ &\quad + \frac{(\alpha^{2s_{N+\ell}-2s_{N-1}} + \alpha^{2s_{N-1}-2s_{N+\ell}}) - (\alpha^{2s_{i+1}} + \alpha^{-2s_{i+1}})}{2} \end{aligned}
Since αsN+i+sN1αsN+i+sN12\frac{\alpha^{s_{N+i}+s_{N-1}}-\alpha^{-s_{N+i}+s_{N-1}}}{\sqrt{2}} is an integer greater than α6D1\alpha^{6D-1}, while the remaining terms are less than α2D+1\alpha^{2D+1}, it must hold that:
α2sN+2sN1+α2sN12sN+=α2si+1+α2si+1. \alpha^{2s_{N+\ell}-2s_{N-1}} + \alpha^{2s_{N-1}-2s_{N+\ell}} = \alpha^{2s_{i+1}} + \alpha^{-2s_{i+1}}.
This implies sN+isN1=si+1|s_{N+i} - s_{N-1}| = s_{i+1}.
Since ff is unbounded, choose N>N > \ell such that sN>6Ds_N > 6D and sN>sN1s_N > s_{N-1}. From the above discussion, we have:
sN+1sN=s1,sNsN1=s1,sN+1sN1=s2, |s_{N+1} - s_N| = s_1, \quad s_N - s_{N-1} = s_1, \quad |s_{N+1} - s_{N-1}| = s_2,
so either s2=0s_2 = 0 or s2=2s1s_2 = 2s_1. If s2=0s_2 = 0, we can use sN>6Ds_N > 6D and (13) to inductively prove that sN+u+2=sN+us_{N+u+2} = s_{N+u} for all uNu \in \mathbb{N}. This contradicts the unboundedness of ff.

Therefore, s2=2s1s_2 = 2s_1, which implies sN+1=sN1+2s1s_{N+1} = s_{N-1} + 2s_1. Next, we examine the conditions that sN+2s_{N+2} must satisfy:
sN+2sN=s2=2s1,sN+2sN+1=s1. |s_{N+2} - s_N| = s_2 = 2s_1, \quad |s_{N+2} - s_{N+1}| = s_1.
Thus sN+2=sN+2s1=sN1+3s1s_{N+2} = s_N + 2s_1 = s_{N-1} + 3s_1, which gives s3=sN+2sN1=3s1s_3 = |s_{N+2} - s_{N-1}| = 3s_1. Continuing this recursion, we obtain s=s1s_\ell = \ell s_1. This proves that all solutions ff satisfying the functional equation are of the form:
f(n)=12(α2ns1+α2ns1). f(n) = \frac{1}{2}(\alpha^{2ns_1} + \alpha^{-2ns_1}).

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.