Maths Olympiad Prep

Library / /791 of 860

Algebra Difficulty 5.6 AIME, harder Find the answer

Let N\mathbb{N} denote the natural numbers. Compute the number of functions f:N{0,1,,16}f: \mathbb{N} \rightarrow\{0,1, \ldots, 16\} such that f(x+17)=f(x) and f(x2)f(x)2+15(mod17)f(x+17)=f(x) \quad \text { and } \quad f\left(x^{2}\right) \equiv f(x)^{2}+15 \quad(\bmod 17) for all integers x1x \geq 1

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

By plugging in x=0x=0, we get that f(0)f(0) can be either 1,2-1,2. As f(0)f(0) is unrelated to all other values, we need to remember to multiply our answer by 2 at the end. Similarly, f(1)=1f(1)=-1 or 2 . Consider the graph xx2x \rightarrow x^{2}. It is a binary tree rooted at -1 , and there is an edge 11-1 \rightarrow 1, and a loop 111 \rightarrow 1. Our first case is f(1)=1f(1)=-1. Note that if x,yx, y satisfy x2=yx^{2}=y, then f(y)1f(y) \neq 1. Otherwise, we would have f(x)2=3(mod17)f(x)^{2}=3(\bmod 17), a contradiction as 3 is a nonresidue. So only the 8 leaves can take the value 1. This contributes 282^{8}. For f(1)=2f(1)=2, we can once again propagate down the tree. While it looks like we have 2 choices at each node (for the square roots), this is wrong, as if f(x)=2f(x)=-2 and y2=xy^{2}=x, then f(y)=0f(y)=0 is forced. Given this intuition, let ana_{n} denote the answer for a binary tree of height nn where the top is either -2 or 2. Therefore, a1=2,a2=5a_{1}=2, a_{2}=5. You can show the recurrence an=an12+22n4a_{n}=a_{n-1}^{2}+2^{2^{n}-4}. This is because if the top is 2 , then we get a contribution of an12a_{n-1}^{2}. If the top is -2 , then both entries below it must be 0 . After that, you can show that each of the remaining 2n42^{n}-4 vertices can be either of 2 possible square roots. Therefore, we get the recurrence as claimed. One can compute that a4=5777a_{4}=5777, so we get the final answer 2(256+5777)=120662(256+5777)=12066.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.