Maths Olympiad Prep

Library / /15 of 34

Number theory Difficulty 7.1 National olympiad, round 2 Find the answer

Let N\mathbb{N} denote the set of positive integers. Find all functions f :NNf : \mathbb{N} \rightarrow \mathbb{N} such that for positive integers aa and b,b, f(a2+b2)=f(a)f(b) and f(a2)=f(a)2.f(a^2 + b^2) = f(a)f(b) \text{ and } f(a^2) = f(a)^2.

A number or a short expression. Spacing and $ signs are ignored.

Solution

I claim that the only function ff that satisfies the constraints outlined within the problem is the function f(n)=1f(n) = 1 for all positive integers nn .
We will proceed with strong induction. The base case is simple, as plugging a=1a=1 into the second equation given within the problem gives f(1)=f(1)2f(1)=f(1)^2 . Since f(n)f(n) can only return a positive integer value, we have that f(1)=1f(1)=1 .
Now we proceed with the inductive step. If the next number nn is either a perfect square or can be represented as a sum of two perfect squares, then obviously f(n)=1f(n)=1 , as it is either the product of two ff -values that are both equal to 11 from the inductive assumption or is the square of an ff -value that is equal to 11 , again due to the inductive assumption. Otherwise, we can use the Sum of Two Squares Theorem, which tells us that nn has at least one prime in its prime factorization that is 3(mod4)3(\mod 4) and is raised to an odd power.
Lemma 1: Given that a2+b2=c2a^2+b^2=c^2 and f(b)=f(c)=1f(b)=f(c)=1 , we then have f(a)=1f(a)=1 .
Proof: Note that the first condition in the problem tells us that f(a2+b2)=f(a)f(b)f(a^2+b^2)=f(a)f(b) , or f(c2)=f(a)f(b)f(c^2)=f(a)f(b) . Using the second condition gives us f(c)2=f(a)f(b)f(c)^2=f(a)f(b) . Plugging in the values of f(b)f(b) and f(c)f(c) gives us that f(a)=1f(a)=1 .
Now we will attempt to repeatedly remove prime factors that are 3(mod4)3(mod 4) and taken to an odd power, and we will move from the largest prime down to the smallest prime that satisfies above conditions. The prime factors will be removed by constructing a Pythagorean Triple with the prime being the smallest leg in the form of p,p212,p2+12p,\frac{p^2-1}{2},\frac{p^2+1}{2} (this will always work as p2p\neq 2 (not 3 mod 4), and this method works via Lemma 1). We will then prove the ending numbers that we achieve via removing all the (mod 4)(\text{mod } 4) primes(which I will refer to as "tips") are equal to 1 b/c they can be expressed as the sum of two squares or is a perfect square(Sum of Two Squares Theorem). For example, if we took the number 2121 , we would first aim to remove the 77 by splitting it into 2424 and 2525 , so 2121 would become 7272 and 7575 . 7575 is divisible by 33 to an odd power, so we transform it into 100100 and 125125 . These two don't have any divisors that are 3(mod 4)3 (\text{mod } 4) raised to an odd power so we leave it alone, as sum of two squares will work on them or they are perfect squares. 7272 does have a prime factor that is 3(mod 4)3(\text{mod } 4) , but it is an even power so we leave it alone. In this case, the tips are 7272 , 100100 , and 125125 . However, now we need to prove two key facts: using this Pythagorean Triple Method will never generate another 3(mod 4)3(\text{mod } 4) prime that is bigger than the current one we are working on or create more primes or keep the same number of primes in the tips' prime factorizations., as otherwise it could cause an infinite cycle, and also we must prove when we use Sum of Two Squares/Perfect Square given in the second condition on the tips the square root of the square(s) used will never be greater than or equal to nn .
The first claim can be proved rather simply. Note that p212\frac{p^2-1}{2} can have no prime factors greater than or equal to pp , as it can be factored as (p1)(p+12)(p-1)(\frac{p+1}{2}) , which are both less than pp and are integers( p+1p+1 must be an integer due to pp must being odd(not equal to 22 )). For p2+12\frac{p^2+1}{2} , we can prove something a bit more general.
Lemma 2: For any positive integer nn , all prime factors of n2+1n^2+1 must be 1(mod 4)1(\text{mod } 4) .
Proof: Note that if n2+10(mod p)n^2+1\equiv 0(\text{mod } p) , then we also must have (n2+1)(n21)=(n41)0(mod p)(n^2+1)(n^2-1)=(n^4-1)\equiv 0(\text{mod } p) , or n41(mod p)n^4 \equiv 1(\text{mod } p) . Now we can apply Fermat's Little Theorem to obtain np11(mod p)n^{p-1}\equiv 1(\text{mod } p) . Note that since nn and n2n^2 are obviously not 1(mod p)1(\text{mod } p) , as n21(mod p)n^2\equiv -1 (\text{mod } p) , we have that p1p-1 is a multiple of 44 , or p1(mod 4)p \equiv 1(\text{mod } 4) .
We can simply apply Lemma 2 to p2+1p^2+1 as 22 is obviously not 3(mod 4)3(\text{mod } 4) , and this means that a prime factor 3(mod 4)3(\text{mod } 4) will never be generated from this term. This completes the first of our two claims.
Now we proceed to the second of our two claims. Note that every time we use the method on nn based on prime pp , we will multiply by around p2\frac{p}{2} , clearly less than pp (if we multiply by pp we would get p2p^2 which is clearly greater than p2+12\frac{p^2+1}{2} ). We will never have to use the same prime twice in our method, so at max in the end we will multiply nn by the product of a little less than all 3(mod4)3(mod 4) primes that divide it, which is less than nn itself for nn greater than or equal to 33 (the smallest 3 mod 4 prime), meaning that the largest number that we must use two squares on that is generated by out method is less than n2n^2 . We need to prove that the two squares that sum to this are both less than nn , which is quite trivial, as they are less than n2\sqrt{n^2} , which obviously means it must be less than nn . This proves the second of our claims.
This completes the second case of the inductive step, and therefore completes both the induction and the problem.
~Solution by hyxue

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.