Divisibility of unknown numbers

{ m 2 + n n 2 m m + n 2 m 2 n \begin{cases} m^2+n \, \vdots \, n^2-m\\ m+n^2 \, \vdots \, m^2-n \end{cases}

How many pairs of positive integers ( m , n ) (m,n) satisfy the conditions above?

Notation: If a b a \,\vdots\, b , then a a is divisible by b b , or b b divides a a .


The answer is 6.

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.

2 solutions

Tin Le
Jul 29, 2020

{ m 2 + n n 2 m m + n 2 m 2 n \left\{\begin{matrix}m^2+n \vdots n^2-m\\ m+n^2 \vdots m^2-n\end{matrix}\right. ( 1 ) (1)

{ m 2 + n n 2 m m + n 2 m 2 n \Leftrightarrow \left\{\begin{matrix} m^2+n \geq n^2-m\\ m+n^2 \geq m^2-n \end{matrix}\right.

{ ( m n + 1 ) ( m + n ) 0 ( n m + 1 ) ( m + n ) 0 \Leftrightarrow \left\{\begin{matrix} (m-n+1)(m+n) \geq 0\\ (n-m+1)(m+n) \geq 0 \end{matrix}\right.

{ m n + 1 0 n m + 1 0 \Leftrightarrow \left\{\begin{matrix} m-n+1 \geq 0\\ n-m+1\geq 0 \end{matrix}\right. (Because m , n m,n are positive integers, m + n > 0 m+n>0 )

1 m n 1 \Leftrightarrow -1 \leq m-n \leq 1

As m , n m,n are positive integers, m n { 1 , 0 , 1 } m-n \in \{ -1,0,1\}


Case 1: m n = 1 m = n 1 \text{Case 1: } m-n=-1 \Leftrightarrow m=n-1

n 2 + m m 2 n n 2 + m m 2 n Z n^2+m \vdots m^2-n \Rightarrow \frac{n^2+m}{m^2-n} \in \Z

n 2 + n 1 ( n 1 ) 2 n Z \Leftrightarrow \frac{n^2+n-1}{(n-1)^2-n} \in \Z

n 2 + n 1 n 2 3 n + 1 Z \Leftrightarrow \frac{n^2+n-1}{n^2-3n+1} \in \Z

( n 2 3 n + 1 ) + 4 n 2 n 2 3 n + 1 Z 4 n 2 n 2 3 n + 1 Z \Leftrightarrow \frac{(n^2-3n+1) + 4n - 2}{n^2-3n+1} \in \Z \Rightarrow \frac{4n-2}{n^2-3n+1} \in \Z

4 n 2 n 2 3 n + 1 n 2 7 n + 3 0 \Rightarrow 4n-2 \geq n^2-3n+1 \Leftrightarrow n^2-7n+3 \leq 0

7 37 2 n 7 + 37 2 \Rightarrow \frac{7-\sqrt{37}}{2} \leq n \leq \frac{7+\sqrt{37}}{2}

As n n is a positive integer, n { 1 , 2 , 3 , 4 , 5 , 6 } n \in \{ 1,2,3,4,5,6\}

Because m = n 1 m=n-1 , we have ( m , n ) = ( 1 , 2 ) , ( 2 , 3 ) , ( 3 , 4 ) , ( 4 , 5 ) , ( 5 , 6 ) (m,n) = (1,2),(2,3),(3,4),(4,5),(5,6)

Substitute these results into ( 1 ) (1) , the solutions satisfying ( 1 ) (1) are ( m , n ) = ( 1 , 2 ) , ( 2 , 3 ) (m,n) = (1,2) , (2,3)


Case 2: m n = 0 m = n \text{Case 2: } m-n=0 \Leftrightarrow m=n

n 2 + m m 2 n Z \frac{n^2+m}{m^2-n} \in \Z

n 2 + n n 2 n Z \Leftrightarrow \frac{n^2+n}{n^2-n} \in \Z

( n 2 n ) + 2 n n 2 n Z 2 n n ( n 1 ) Z 2 n 1 Z \Leftrightarrow \frac{(n^2-n) + 2n}{n^2-n} \in \Z \Rightarrow \frac{2n}{n(n-1)} \in \Z \Leftrightarrow \frac{2}{n-1} \in \Z

n 1 2 n 3 \Rightarrow n-1 \leq 2 \Rightarrow n \leq 3

As n n is a positive integer, n { 1 , 2 , 3 } n \in \{ 1,2,3\}

Because m = n m=n , we have ( m , n ) = ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) (m,n) = (1,1),(2,2),(3,3)

Substitute these results into ( 1 ) (1) , the solutions satisfying ( 1 ) (1) are ( m , n ) = ( 2 , 2 ) , ( 3 , 3 ) (m,n) = (2,2), (3,3)


Case 3: m n = 1 m = n + 1 \text{Case 3: } m-n=1 \Leftrightarrow m=n+1

m 2 + n n 2 m m 2 + n n 2 m Z m^2+n \vdots n^2-m \Rightarrow \frac{m^2+n}{n^2-m} \in \Z

( n + 1 ) 2 + n n 2 n 1 Z \Leftrightarrow \frac{(n+1)^2+n}{n^2-n-1} \in \Z

n 2 + 3 n + 1 n 2 n 1 Z \Leftrightarrow \frac{n^2+3n+1}{n^2-n-1} \in \Z

( n 2 n 1 ) + 4 n + 2 n 2 n 1 Z 4 n + 2 n 2 n 1 Z \Leftrightarrow \frac{(n^2-n-1) + 4n + 2}{n^2-n-1} \in \Z \Rightarrow \frac{4n+2}{n^2-n-1} \in \Z

4 n + 2 n 2 n 1 n 2 5 n 3 0 \Rightarrow 4n+2 \geq n^2-n-1 \Leftrightarrow n^2-5n-3 \leq 0

5 37 2 n 5 + 37 2 \Rightarrow \frac{5-\sqrt{37}}{2} \leq n \leq \frac{5+\sqrt{37}}{2}

As n n is a positive integer, n { 1 , 2 , 3 , 4 , 5 } n \in \{ 1,2,3,4,5\}

Because m = n + 1 m=n+1 , we have ( m , n ) = ( 2 , 1 ) , ( 3 , 2 ) , ( 4 , 3 ) , ( 5 , 4 ) , ( 6 , 5 ) (m,n) = (2,1),(3,2),(4,3),(5,4),(6,5)

Substitute these results into ( 1 ) (1) , the solutions satisfying ( 1 ) (1) are ( m , n ) = ( 2 , 1 ) , ( 3 , 2 ) (m,n) = (2,1) , (3,2)


Conclusion: \text{Conclusion: } There are 6 \boxed{6} solutions satisfying ( 1 ) (1) , which are ( m , n ) = ( 1 , 2 ) , ( 2 , 1 ) , ( 2 , 2 ) , ( 2 , 3 ) , ( 3 , 2 ) , ( 3 , 3 ) (m,n) = (1,2), (2,1), (2,2), (2,3), (3,2), (3,3)

The problem states "For example, a b a \vdots b means that a a is divisible by b b , or a a divides b b . " The part where it says a a divides b b is incorrect.

Also, I think (1,2) and (2,1) should be included as solutions.

Jon Haussmann - 10 months, 2 weeks ago

Log in to reply

I agree and reported the problem.

David Vreken - 10 months, 2 weeks ago

If the problem stated that m m and n n are distinct positive integers, then the number of solutions is 4 4 . But since it wasn't stated that way, if the variables can have the same value, it would be 6 6 .

Kaizen Cyrus - 10 months, 2 weeks ago

Log in to reply

Thanks. I've updated the answer to 6 . Those who previously answered 6 has been marked correct.

In the future, if you have concerns about a problem's wording/clarity/etc., you can report the problem. See how here .

Brilliant Mathematics Staff - 10 months, 2 weeks ago

Code

1
2
3
4
5
6
7
for n in range(1,180):
    for m in range(1,180):
        if (m**2!=n):
            if (n**2!=m):
                if ((m**2+n)%(n**2-m)==0):
                    if ((n**2+m)%(m**2-n)==0):
                        print (m,n)

Output

1
2
3
4
5
6
2 1
1 2
2 2
3 2
2 3
3 3

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...