How Many Good Pairs?

A pair of positive integers ( m , n ) (m, n) is called good if m m divides n 2 + 1 n^2+1 and n n divides m 2 + 1. m^2+1.

A positive integer n n is called admissible if there exists an integer m m for which the pair ( m , n ) (m, n) is good.

Find the sum of all admissible positive integers 100. \leq 100.

Details and assumptions
- As an explicit example, since 5 5 divides 1 3 2 + 1 13^2+1 and 13 13 divides 5 2 + 1 , 5^2+1, the pair ( 5 , 13 ) (5, 13) is good. This also implies 5 5 are 13 13 are admissible integers.
- This problem is an extension of an old BMO problem.


The answer is 144.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Claim: ( m , n ) (m, n) is a good pair if and only if so is ( m 2 + 1 n , m ) . \left( \dfrac{m^2+1}{n}, m \right).

Proof: Let x = m 2 + 1 n . x = \dfrac{m^2+1}{n}. We trivially have x m 2 + 1. x \mid m^2+1. Note that gcd ( x , m ) = gcd ( n , m ) = 1 , \gcd (x, m) = \gcd (n, m)= 1, and x n 1 ( m o d m ) , xn \equiv 1 \pmod{m}, so x 2 + 1 ( 1 n ) 2 + 1 n 2 + 1 n 0 ( m o d m ) , x^2 + 1 \equiv \left( \dfrac{1}{n} \right) ^2 + 1\equiv \dfrac{n^2+1}{n} \equiv 0 \pmod{m}, so m m divides x 2 + 1. x^2+1. Hence ( m 2 + 1 n , m ) \left( \dfrac{m^2+1}{n}, m \right) is good. Conversely, if ( m 2 + 1 n , m ) \left( \dfrac{m^2+1}{n}, m \right) is good, so must be ( m 2 + 1 ( m 2 + 1 ) / n , m ) = ( n , m ) . \left( \dfrac{m^2+1}{(m^2+1)/n}, m \right) = (n, m). The claim is proved. \blacksquare


By the claim, given any good pair ( m , n ) , (m, n), we can successively apply the operation ( m , n ) ( m , m 2 + 1 n ) (m, n) \rightarrow \left( m, \dfrac{m^2+1}{n} \right) and eventually arrive at a good pair of the form ( 1 , α ) (1, \alpha) for some α N . \alpha \in \mathbb{N}. Since α \alpha divides 1 2 + 1 = 2 , 1^2+1= 2, α \alpha is either 1 1 or 2. 2. We shall now reconstruct our solutions from this.

  • If α = 1 , \alpha = 1, applying the operation backwards gives the following good pairs. ( 1 , 1 ) ( 2 , 1 ) ( 5 , 2 ) (1, 1) \rightarrow (2, 1) \rightarrow (5, 2) \rightarrow \cdots
  • We get the same solutions except ( 1 , 1 ) (1, 1) when α = 2. \alpha = 2.

Let F k F_k denote the k th k^{\text{th}} Fibonacci number. We claim that all good pairs are of the form ( F 2 k 1 , F 2 k + 1 ) . (F_{2k-1}, F_{2k+1}). The proof is by induction. The base case k = 1 k=1 holds true, since ( F 2 1 1 , F 2 1 + 1 ) = ( 1 , 2 ) (F_{2 \cdot 1 - 1}, F_{2 \cdot 1 + 1}) = (1, 2) is indeed a good pair. For the inductive step, assume it is true for some k N 1 . k \in \mathbb{N_{\geq 1}}. By our reverse operation, the next solution is given by ( F 2 k 1 2 + 1 F 2 k + 1 , F 2 k + 1 ) = ( F 2 k + 1 , F 2 k + 3 ) , \left( \dfrac{F_{2k-1}^2 + 1}{F_{2k+1}}, F_{2k+1} \right) = (F_{2k+1}, F_{2k+3}), where we have used the well known identity F n 1 F n + 1 F n 2 = ( 1 ) n n N . F_{n-1} F_{n+1} - F_n^2= (-1)^n \quad \ \forall n \in \mathbb{N}. Hence, all admissible integers are the Fibonacci numbers with an odd index. All such integers less than 100 100 are 1 , 2 , 5 , 13 , 34 , 89 , 1, 2, 5, 13, 34, 89, and their sum is 144 . \boxed{144}.

I'm super mad I got 55 because I forgot about 89. I got all the other ones though. D:

Finn Hulse - 7 years, 1 month ago

Log in to reply

What happened to your other two tries?

Sreejato Bhattacharya - 7 years, 1 month ago

Log in to reply

I gave up. I'm swag-alicious like that. I mean seriously, I spent half an hour plugging in values in to my calculator and prime-factorizing with factor trees on paper. You can imagine I was pretty tired. :D

Finn Hulse - 7 years, 1 month ago

Totally a badass solution :)

Lutfar Milu - 7 years, 1 month ago

Got all the pairs but added up the numbers twice, like in(1,2) and (5,2), added up 2 twice :(

Vineeth Chelur - 7 years, 1 month ago

There is a method that involves showing that the only solutions are the solutions to the equation x 2 + y 2 + 1 = x y z x^2+y^2+1=xyz and then show that z=3 and then constructing the solutions.The approach can be found in Titu Andreescu's book on intro to diophantine equations,section-FMID.

Rahul Saha - 7 years, 1 month ago

This problem appears too many times in brilliant already.

Si Yu How - 7 years ago

i didn't read the QUESTION correctly, you ask for the SUM .... well my bad.

lis nik - 7 years ago

Let me clear some ambiguity here. The notation a 1 b ( m o d n ) a \equiv \dfrac{1}{b} \pmod{n} doesn't agree with the definition of congruencies. However, given that gcd ( a , n ) = 1 , \gcd (a, n)=1, b b in this case denotes the multiplicative inverse of a ( m o d n ) , a \pmod{n}, which exists and is unique modulo n . n. As long as the numbers are coprime with n , n, we can manipulate these reciprocals according to the rules of normal arithmetic.

Sreejato Bhattacharya - 7 years, 1 month ago

can you please explain how x n 1 ( m o d n ) xn \equiv 1\pmod n ? and proving the fibonacci series for (k+1) case..

Krishna Vittal - 7 years, 1 month ago

Log in to reply

Note that x n 1 = m 2 , xn-1 = m^2, which is a multiple of m . m. That's why x n 1 ( m o d m ) . xn \equiv 1 \pmod{m}. Regarding your second query, could you be more specific? Which exact line do you think is ambiguous / unclear?

Sreejato Bhattacharya - 7 years, 1 month ago

Just a few line of code and you can get the answer :-D

Nirob 3.1416 - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...