Maths Olympiad Prep

Library / /1049 of 1394

Number theory Difficulty 5.5 AIME, harder Prove it United States

Problem:
Compute the number of ordered pairs (m,n)(m, n) of odd positive integers both less than 8080 such that
gcd(4m+2m+1,4n+2n+1)>1.\gcd (4^{m} + 2^{m} + 1, 4^{n} + 2^{n} + 1) > 1.

Solution

Solution:
First, we characterize all ordered pairs of general (not necessarily odd) positive integers (m,n)(m, n) such that gcd(4m+2m+1,4n+2n+1)>1\gcd (4^{m} + 2^{m} + 1, 4^{n} + 2^{n} + 1) > 1. We claim that (m,n)(m, n) works if and only if either
- mm and nn are both even, or
- ν3(m)=ν3(n)\nu_{3}(m) = \nu_{3}(n).

Proof of necessity. Suppose that pp is a prime that divides both 4m+2m+14^{m} + 2^{m} + 1 and 4n+2n+14^{n} + 2^{n} + 1. If p=3p = 3, mm and nn must both be even. Henceforth assume that p3p \neq 3. Let dd be the order of 22 modulo pp. Then, as p23m1p \mid 2^{3m} - 1, we find that d3md \mid 3m. Furthermore, we cannot have p2m1p \mid 2^{m} - 1. Otherwise, by lifting the exponent (and p3p \neq 3),
νp(23m1)=νp(2m1)+νp(3)=νp(2m1)    νp(4m+2m+1)=0. \nu_{p}(2^{3m} - 1) = \nu_{p}(2^{m} - 1) + \nu_{p}(3) = \nu_{p}(2^{m} - 1) \implies \nu_{p}(4^{m} + 2^{m} + 1) = 0.
The previous two results imply ν3(d)=ν3(m)+1\nu_{3}(d) = \nu_{3}(m) + 1. Similarly, ν3(d)=ν3(n)+1\nu_{3}(d) = \nu_{3}(n) + 1, so ν3(m)=ν3(n)\nu_{3}(m) = \nu_{3}(n).

Proof of sufficiency. If mm and nn are both even, then 33 divides both 4m+2m+14^{m} + 2^{m} + 1 and 4n+2n+14^{n} + 2^{n} + 1. If ν3(m)=ν3(n)=k\nu_{3}(m) = \nu_{3}(n) = k, then we claim that 43k+23k+14^{3^{k}} + 2^{3^{k}} + 1 divides both 4m+2m+14^{m} + 2^{m} + 1 and 4n+2n+14^{n} + 2^{n} + 1. Indeed, note that as polynomials, x2+x+1x^{2} + x + 1 divides x2+x+1x^{2\ell} + x^{\ell} + 1 when 33 \nmid \ell. Plugging in x=23kx = 2^{3^{k}} with =m/3k\ell = m / 3^{k} and =n/3k\ell = n / 3^{k} yields the desired result.

Answer Extraction. We count pairs of odd integers (m,n)(m,n) less than 8080 with ν3(m)=ν3(n)\nu_{3}(m) = \nu_{3}(n). Of all integers in the set {1,3,5,,79}\{1,3,5,\ldots ,79\}, there are 2727, 99, 33, and 11 of them that have ν3\nu_{3} equal to 00, 11, 22, and 33, respectively. Hence, the answer is 272+92+32+12=82027^{2} + 9^{2} + 3^{2} + 1^{2} = 820.

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.