Christyan Tamaro's integer pairs

How many ordered pairs of positive integers ( a , b ) (a,b) are there such that 4 a 1 b \dfrac{4a-1}{b} and 4 b 1 a \dfrac{4b-1}{a} are both integers?

This problem is posed by Christyan Tamaro N .


The answer is 7.

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.

6 solutions

Artupazira Ykzer
Oct 7, 2013

Without loss of generality,assume a b a\geq b .Then 4 b 1 a < 4 a a = 4 \frac{4b-1}{a}<\frac{4a}{a}=4 .But 4 b 1 a \frac{4b-1}{a} must be odd,since it divides an odd number 4 b 1 4b-1 .Then there are 2 cases: Case 1: 4 b 1 a = 1 \frac{4b-1}{a}=1 In this case b 4 a 1 = 16 b 5 b 5 b|4a-1=16b-5 \Rightarrow b|5 .Thus,the solutions in this case are ( 3 , 1 ) (3,1) and ( 19 , 5 ) (19,5) .

Case 2: 4 b 1 a = 3 \frac{4b-1}{a}=3 In this case the ordered pairs that satisfy this is in form ( 4 k + 1 , 3 k + 1 ) (4k+1,3k+1) .Then 3 k + 1 = b 4 a 1 = 16 k + 3 3 k + 1 16 ( 3 k + 1 ) 3 ( 16 k + 3 ) = 7 3k+1=b|4a-1=16k+3 \Rightarrow 3k+1|16(3k+1)-3(16k+3)=7 .We have k = 0 k=0 and k = 2 k=2 ,yielding the solutions ( 1 , 1 ) (1,1) and ( 9 , 7 ) (9,7) .

Since in 3 of the solutions we can flip a a and b b ,then in total there are 1 + 2 3 = 7 1+2\cdot3=7 solutions

Moderator note:

Very nice solution!

Perhaps, the part that "In this case the ordered pairs that satisfy this is in form ( 4 k + 1 , 3 k + 1 ) (4k+1,3k+1) ." could have been explained in more details.

Since a 3 a 4 b 1 1 ( m o d 4 ) a 1 ( m o d 4 ) -a\equiv 3a\equiv 4b-1\equiv -1 \pmod{4} \Rightarrow a\equiv 1\pmod{4} ,then we can set a = 4 k + 1 a=4k+1 and get b = 3 k + 1 b=3k+1

Artupazira ykzer - 7 years, 8 months ago
Jared Low
Oct 7, 2013

Since 4 a 1 b \frac {4a-1}{b} , 4 b 1 a \frac {4b-1}{a} are integers, it follows that 4 a 1 b 4 b 1 a \frac {4a-1}{b}\cdot\frac {4b-1}{a} would also be an integer. This then expands to give us 16 4 a 4 b + 1 a b = 16 ( 4 a + 4 b 1 a b ) 16-\frac{4}{a}-\frac{4}{b}+\frac{1}{ab}=16-(\frac{4}{a}+\frac{4}{b}-\frac{1}{ab}) .

It thus suffices to find ordered pairs ( a , b ) (a,b) where 4 a + 4 b 1 a b \frac{4}{a}+\frac{4}{b}-\frac{1}{ab} is an integer. When a = 1 a=1 , we have to find b b where 3 b \frac{3}{b} is an integer, which occurs when b = 1 , 3 b=1,3 . When a = 3 a=3 , we have to find b b where 11 b \frac{11}{b} and 4 b 1 3 \frac{4b-1}{3} are both integers, which is an integer only when b = 1 b=1 (basically an inverse of one of our previous cases)

So, if we have a 5 a \geq 5 , we must have b 5 b \geq 5 (If we have b < 5 b<5 , then following the above cases, we would also have a < 5 a<5 .). With a , b 5 a,b \geq 5 , we have 4 a + 4 b 1 a b < 4 4 + 4 4 = 1 + 1 = 2 \frac{4}{a}+\frac{4}{b}-\frac{1}{ab}<\frac{4}{4}+\frac{4}{4}=1+1=2 which means that we must have 4 a + 4 b 1 a b = 1 \frac{4}{a}+\frac{4}{b}-\frac{1}{ab}=1 .

Multiplying our expression above by a b ab , we get 4 a + 4 b 1 = a b 4a+4b-1=ab . Rearranging it gives us a b 4 a 4 b + 16 = ( a 4 ) ( b 4 ) = 16 + ( 1 ) = 15 ab-4a-4b+16=(a-4)(b-4)=16+(-1)=15 The ordered pairs ( a , b ) (a,b) we can get from this are then ( 5 , 19 ) , ( 7 , 9 ) , ( 9 , 7 ) , ( 19 , 5 ) (5,19),(7,9),(9,7),(19,5) , basically ( a 4 ) (a-4) and ( b 4 ) (b-4) being positive factors of 15 15 . With the 3 above solutions ( ( a , b ) = ( 1 , 1 ) , ( 1 , 3 ) , ( 3 , 1 ) (a,b)=(1,1),(1,3),(3,1) ), there are altogether 7 \fbox{7} such ordered pairs.

Moderator note:

Nice solution!

It is easy to see that both of a a and b b are odd integers only.

(For instant, if a a is even, then 2 a 2 \mid a and a ( 4 b 1 ) a \mid (4b-1) imply 2 ( 4 b 1 ) 2 \mid (4b-1) . Consequently, 2 1 2 \mid -1 , which is impossible.)

Since a ( 4 b 1 ) a \mid (4b-1) and b ( 4 a 1 ) b \mid (4a-1) , a b ( 4 a 1 ) ( 4 b 1 ) ab \mid (4a-1)(4b-1) .

Which implies a b ( 4 a + 4 b 1 ) ab \mid (4a+4b-1) .

Therefore a b 4 a + 4 b 1 ab \le |4a+4b-1| .

Because a , b 1 a,b \ge 1 , 4 a + 4 b 1 > 0 4a+4b-1 >0 .

Hence a b 4 a + 4 b 1 ab \le 4a+4b-1 .

Factorize and obtain ( a 4 ) ( b 4 ) 15 (a-4)(b-4) \le 15 .

This gives us the result that if b > 4 b>4 then a 19 a \le 19 .

Thus we can consider case-by-case where b = 1 , 3 b=1,3 and a = 1 , 3 , 5 , 7 , 9 , 11 , 13 , 15 , 17 , 19 a=1,3,5,7,9,11,13,15,17,19 while b > 4 b>4 .

Case I : b = 1 , 3 b=1,3 .

If b = 1 b=1 we get a 3 a \mid 3 and 1 ( 4 a 1 ) 1 \mid (4a-1) . Then ( a , b ) = ( 1 , 1 ) , ( 3 , 1 ) (a,b)=(1,1),(3,1) .

If b = 3 b=3 we get a 11 a \mid 11 and 3 ( 4 a 1 ) 3 \mid (4a-1) . Then ( a , b ) = ( 1 , 3 ) (a,b)=(1,3) .

Case II : a = 1 , 3 , 5 , 7 , 9 , 11 , 13 , 15 , 17 , 19 a=1,3,5,7,9,11,13,15,17,19 and b > 4 b>4 .

If a = 1 a=1 we get b 3 b \mid 3 and 1 ( 4 b 1 ) 1 \mid (4b-1) . This case is impossible.

If a = 3 a=3 we get b 11 b \mid 11 and 3 ( 4 b 1 ) 3 \mid (4b-1) . This case is impossible.

If a = 5 a=5 we get b 19 b \mid 19 and 5 ( 4 b 1 ) 5 \mid (4b-1) . Then ( a , b ) = ( 5 , 19 ) (a,b)=(5,19) .

If a = 7 a=7 we get b 27 b \mid 27 and 7 ( 4 b 1 ) 7 \mid (4b-1) . Then ( a , b ) = ( 7 , 9 ) (a,b)=(7,9) .

If a = 9 a=9 we get b 35 b \mid 35 and 9 ( 4 b 1 ) 9 \mid (4b-1) . Then ( a , b ) = ( 9 , 7 ) (a,b)=(9,7) .

If a = 11 a=11 we get b 43 b \mid 43 and 11 ( 4 b 1 ) 11 \mid (4b-1) . This case is impossible.

If a = 13 a=13 we get b 51 b \mid 51 and 13 ( 4 b 1 ) 13 \mid (4b-1) .This case is impossible.

If a = 15 a=15 we get b 59 b \mid 59 and 15 ( 4 b 1 ) 15 \mid (4b-1) . This case is impossible.

If a = 17 a=17 we get b 67 b \mid 67 and 17 ( 4 b 1 ) 17 \mid (4b-1) . This case is impossible.

If a = 19 a=19 we get b 75 b \mid 75 and 19 ( 4 b 1 ) 19 \mid (4b-1) . Then ( a , b ) = ( 19 , 5 ) (a,b)=(19,5) .

From all cases, we conclude that ( a , b ) = ( 1 , 1 ) , ( 1 , 3 ) , ( 3 , 1 ) , ( 5 , 19 ) , ( 7 , 9 ) , ( 9 , 7 ) , ( 19 , 5 ) (a,b)=(1,1),(1,3),(3,1),(5,19),(7,9),(9,7),(19,5) .

Therefore, there are 7 7 ordered pairs satisfying the problem.

Moderator note:

This is not the simplest way to do it, but it definitely works.

If a = b a=b , it is easy to check ( 1 , 1 ) (1,1) is the only solution.

Let a < b a<b , then ( 4 a 1 ) (4a-1) which is odd can be either of b b or 3 b 3b . (not higher since a < b a<b )

Case 1: If 4 a 1 = b 4a-1=b , then from the other relation a ( 16 a 5 ) a 5 a = 1 , 5 a| (16a-5) \Rightarrow a|5 \Rightarrow a=1,5 . This contributes to solutions ( 1 , 3 ) , ( 5 , 19 ) (1,3),(5,19) .

Case 2: If 4 a 1 = 3 b 4a-1=3b , then from the other relation 3 a ( 16 a 7 ) 3 a ( 7 a ) 3a| (16a-7) \Rightarrow 3a|(7-a) . Now we can have 7 a = 0 , 3 a , 6 a , 7-a = 0,3a,6a, etc. It is easy to check integral solutions exist iff ( 7 a ) = 0 , 6 a a = 1 , 7 (7-a)=0,6a \Rightarrow a=1,7 This contributes to solution ( 7 , 9 ) (7,9) [ ( 1 , 1 ) (1,1) is already counted].

Since the pairs are ordered, for the latter three, we have 6 permissible pairs along with first one, giving 7 solutions in all.

Sagnik Saha
Oct 8, 2013

First let us find solutions where a=b.

In this case we have a|4a-1 which implies a|-1.

Since a is a positive integers, a must be 1.

So only solution with a=b is (a,b)=(1,1).

Now we shall find solutions where a is not equal to b.

Assume that that a < b.

Since the given fact is symmetric in a and b, we don't need to consider the case b < a.

If (a,b)=(a 0, b 0) is a solution in the first case, (a,b)=(b 0,a 0) will be a solution in the later case and vice versa.

So we have a divisor of 4a-1 namely b which is greater than a.

Suppose 4a - 1 = bx. Since b > a, x < 4.

x can not be 2 since 4a-1 is odd. So x can only be 1 or 3.

Case I) x = 1, i.e., 4a - 1 = b.

In this case from a|4b-1, we get a|5. So a = 1 or a = 5.

If a = 1, we get b = 3.

If a = 5, we get b =19.

So we get the solutions (1,3) and (5,19) from this case.

Case II) x = 3, i.e., 4a - 1 = 3b.

In this case from a|4b-1, we get a|7. So a = 1 or a = 7.

If a = 1 we get b = 1 which is impossible since a<b.

If a = 7 we get b = 9.

So from this case we get the solution (7,9).

So all possible solutions are (1,1), (1,3), (5,19), (7,9), (3,1), (19,5), (9,7).

Angel Leon
Oct 12, 2013

With the lazy hacker's method. This problem had me for 4 days, in the end I just decided to brute force it with a simple algorithm.

def areIntegerSolutions(a,b):
  return (((4*a)-1) % b == 0) and  (((4*b)-1) % a == 0)

for a in range(1,10000):
  for b in range(1,10000):
    if areIntegerSolutions(a,b):
      print "("+str(a)+","+str(b)+")\n"

>>> (1,1)

>>> (1,3)

>>> (3,1)

>>> (5,19)

>>> (7,9)

>>> (9,7)

>>> (19,5)

Wait you're allowed to program???

Well I guess there isn't a rule against it, but isn't it technically cheating?

William Cui - 7 years, 8 months ago

Log in to reply

not sure if it's cheating, but after 4 days of thinking about a problem and not being able to crack it, your hacker kicks in.

Angel Leon - 7 years, 8 months ago

you're a cheater men.

John Aries Sarza - 7 years, 8 months ago

cHeater..

John Aries Sarza - 7 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...