Maths Olympiad Prep

Library / /24 of 24

Algebra Difficulty 6.0 National Olympiad Prove it United States

Problem:

Let p=2017p=2017 be a prime and Fp\mathbb{F}_p be the integers modulo pp. A function f:ZFpf: \mathbb{Z} \rightarrow \mathbb{F}_p is called good if there is αFp\alpha \in \mathbb{F}_p with α≢0(modp)\alpha \not \equiv 0 (\bmod p) such that
f(x)f(y)=f(x+y)+αyf(xy)(modp) f(x) f(y) = f(x+y) + \alpha^{y} f(x-y) \quad (\bmod p)
for all x,yZx, y \in \mathbb{Z}. How many good functions are there that are periodic with minimal period 20162016?

Solution

Solution:

We will classify all good functions with parameter αFp{0}\alpha \in \mathbb{F}_p \setminus \{0\}. We will use == to denote equality modulo pp when appropriate. Let the given statement be P(x,y)P(x, y). Then P(x,0)P(x, 0) gives f(x)f(0)=2f(x)f(x) f(0) = 2 f(x) for all xZx \in \mathbb{Z}. ff cannot be the zero function because it does not have minimal period 20162016. Therefore f(0)=2f(0) = 2.

P(x,1)P(x, 1) gives f(x+1)f(1)f(x)+αf(x1)=0f(x+1) - f(1) f(x) + \alpha f(x-1) = 0. This means that ff satisfies a recurrence of depth two.

We can interpret ff as a function f:ZFp2f: \mathbb{Z} \rightarrow \mathbb{F}_{p^2}, embedding the codomain Fp\mathbb{F}_p inside of Fp2\mathbb{F}_{p^2}. Let τ,ρ\tau, \rho be the unique roots of t2f(1)t+α=0t^2 - f(1) t + \alpha = 0 in Fp2\mathbb{F}_{p^2}, so that τ+ρ=f(1)\tau + \rho = f(1), τρ=α\tau \rho = \alpha. Since α\alpha is nonzero, so are τ\tau and ρ\rho. Notice that f(0)=τ0+ρ0f(0) = \tau^0 + \rho^0 and f(1)=τ1+ρ1f(1) = \tau^1 + \rho^1. By induction up and down, we see that f(n)=τn+ρnf(n) = \tau^n + \rho^n for all nZn \in \mathbb{Z}.

We can also easily check that given any value of f(1)f(1) and α\alpha with α≢0(modp)\alpha \not\equiv 0 (\bmod p), we get a unique such function. Thus there are p(p1)p(p-1) total such functions, one corresponding to each quadratic t2at+bt^2 - a t + b, where b0b \neq 0. If τ,ρ\tau, \rho are the roots of the quadratic, the associated function is f(n)=τn+ρnf(n) = \tau^n + \rho^n.

Now if ff is qq-periodic then f(n)=f(n+q)f(n) = f(n+q) for all nZn \in \mathbb{Z}, so τn+ρn=τn+q+ρn+q\tau^n + \rho^n = \tau^{n+q} + \rho^{n+q} for all nZn \in \mathbb{Z} so
τn(1τq)=ρn(ρq1) \tau^n (1 - \tau^q) = \rho^n (\rho^q - 1)
We have two cases.

Case 1. τρ\tau \neq \rho.

Then n=0n=0 and n=1n=1 above give 1=τq=ρq1 = \tau^q = \rho^q, and this is furthermore sufficient to be qq-periodic. Thus the period of ff is the minimal qq such that τq=ρq=1\tau^q = \rho^q = 1, so the lcm of the orders of τ,ρ\tau, \rho as elements of Fp2\mathbb{F}_{p^2}.

Case 2. τ=ρ\tau = \rho.

Then we see that τ=ρ=f(1)2\tau = \rho = \frac{f(1)}{2}, so they are in Fp\mathbb{F}_p. This automatically means that f(n)=2(f(1)2)nf(n) = 2 \left(\frac{f(1)}{2}\right)^n for all nZn \in \mathbb{Z}, where f(1)0f(1) \neq 0 is forced (as τρ=α\tau \rho = \alpha). This has period dividing p1p-1. More specifically, the period is the order of f(1)2\frac{f(1)}{2} as an element of Fp\mathbb{F}_p.

In the first case, note that the orders of τ,ρ\tau, \rho dividing p1p-1 implies that τ,ρ\tau, \rho are actually in Fp\mathbb{F}_p, so that we can restrict to counting recurrences f(n)=an+bnf(n) = a^n + b^n where a,ba, b are nonzero elements of Fp\mathbb{F}_p.

The unordered pair {a,b}\{a, b\} determines a+b=f(1)a+b = f(1) and ab=αab = \alpha, so it determines a unique ff by our earlier observation. We need to count the number of such pairs with lcm(ordp(a),ordp(b))=p1\operatorname{lcm}(\operatorname{ord}_p(a), \operatorname{ord}_p(b)) = p-1.

Recall that for dp1d \mid p-1, there are ϕ(d)\phi(d) elements of order dd in Fp×\mathbb{F}_p^{\times}. If a=ba = b we need ordp(a)=p1\operatorname{ord}_p(a) = p-1, so there are ϕ(p1)\phi(p-1) functions. If SS is the number of ordered pairs (a,b)(a, b) with lcm(ordp(a),ordp(b))=p1\operatorname{lcm}(\operatorname{ord}_p(a), \operatorname{ord}_p(b)) = p-1, then we see that the desired count is ϕ(p1)+S2\frac{\phi(p-1) + S}{2} (as each unordered pair {a,b}\{a, b\} is counted twice as an ordered pair except for those with a=ba = b).

Now let n=p1n = p-1. We are counting pairs with the lcm equal to nn. The number of pairs with respective orders d1,d2d_1, d_2 is ϕ(d1)ϕ(d2)\phi(d_1) \phi(d_2) hence our desired sum is d1,d2n,lcm(d1,d2)=nϕ(d1)ϕ(d2)\sum_{d_1, d_2 \mid n, \operatorname{lcm}(d_1, d_2) = n} \phi(d_1) \phi(d_2). Now notice that ϕ\phi is a multiplicative function, and the condition on the sum splits among the prime powers dividing nn, so we can choose how d1,d2d_1, d_2 behave on the prime factors of nn independently. Therefore if we define
χ(n)=d1,d2n,lcm(d1,d2)=nϕ(d1)ϕ(d2) \chi(n) = \sum_{d_1, d_2 \mid n, \operatorname{lcm}(d_1, d_2) = n} \phi(d_1) \phi(d_2)
then χ\chi is multiplicative. Finally, if qq is prime and e1e \geq 1 we have
χ(qe)=d1,d2qe,lcm(d1,d2)=qeϕ(d1)ϕ(d2)=2ϕ(qe)(ϕ(1)+ϕ(q)++ϕ(qe1))+ϕ(qe)2=2qe1(q1)qe1+q2e2(q1)2=q2e2(q21)=q2e(11q2) \begin{aligned} \chi(q^e) & = \sum_{d_1, d_2 \mid q^e, \operatorname{lcm}(d_1, d_2) = q^e} \phi(d_1) \phi(d_2) \\ & = 2 \phi(q^e) (\phi(1) + \phi(q) + \cdots + \phi(q^{e-1})) + \phi(q^e)^2 \\ & = 2 q^{e-1}(q-1) q^{e-1} + q^{2e-2}(q-1)^2 \\ & = q^{2e-2}(q^2 - 1) = q^{2e} \left(1 - \frac{1}{q^2}\right) \end{aligned}
This implies that χ(n)=n2qn(11q2)\chi(n) = n^2 \prod_{q \mid n} \left(1 - \frac{1}{q^2}\right) by multiplicativity. Finally, our original answer is
ϕ(p1)+(p1)2qp1(11q2)2 \frac{\phi(p-1) + (p-1)^2 \prod_{q \mid p-1} \left(1 - \frac{1}{q^2}\right)}{2}
which we now compute for p=2017p = 2017. We have p1=2016=25327p-1 = 2016 = 2^5 \cdot 3^2 \cdot 7. Thus ϕ(p1)=24236=576\phi(p-1) = 2^4 \cdot 2 \cdot 3 \cdot 6 = 576 and q2016(11q2)=34894849=3249\prod_{q \mid 2016} \left(1 - \frac{1}{q^2}\right) = \frac{3}{4} \cdot \frac{8}{9} \cdot \frac{48}{49} = \frac{32}{49}. Thus the number of functions is
576+3249201622=576+215342=288+21434=1327392 \frac{576 + \frac{32}{49} \cdot 2016^2}{2} = \frac{576 + 2^{15} \cdot 3^4}{2} = 288 + 2^{14} \cdot 3^4 = 1327392

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 reproduced verbatim; metadata (topic, difficulty) added by this project.