How many ordered pairs of positive integers ( a , b ) are there such that b 4 a − 1 and a 4 b − 1 are both integers?
This problem is posed by Christyan Tamaro N .
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.
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 ) ." 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 ) ,then we can set a = 4 k + 1 and get b = 3 k + 1
Since b 4 a − 1 , a 4 b − 1 are integers, it follows that b 4 a − 1 ⋅ a 4 b − 1 would also be an integer. This then expands to give us 1 6 − a 4 − b 4 + a b 1 = 1 6 − ( a 4 + b 4 − a b 1 ) .
It thus suffices to find ordered pairs ( a , b ) where a 4 + b 4 − a b 1 is an integer. When a = 1 , we have to find b where b 3 is an integer, which occurs when b = 1 , 3 . When a = 3 , we have to find b where b 1 1 and 3 4 b − 1 are both integers, which is an integer only when b = 1 (basically an inverse of one of our previous cases)
So, if we have a ≥ 5 , we must have b ≥ 5 (If we have b < 5 , then following the above cases, we would also have a < 5 .). With a , b ≥ 5 , we have a 4 + b 4 − a b 1 < 4 4 + 4 4 = 1 + 1 = 2 which means that we must have a 4 + b 4 − a b 1 = 1 .
Multiplying our expression above by a b , we get 4 a + 4 b − 1 = a b . Rearranging it gives us a b − 4 a − 4 b + 1 6 = ( a − 4 ) ( b − 4 ) = 1 6 + ( − 1 ) = 1 5 The ordered pairs ( a , b ) we can get from this are then ( 5 , 1 9 ) , ( 7 , 9 ) , ( 9 , 7 ) , ( 1 9 , 5 ) , basically ( a − 4 ) and ( b − 4 ) being positive factors of 1 5 . With the 3 above solutions ( ( a , b ) = ( 1 , 1 ) , ( 1 , 3 ) , ( 3 , 1 ) ), there are altogether 7 such ordered pairs.
Nice solution!
It is easy to see that both of a and b are odd integers only.
(For instant, if a is even, then 2 ∣ a and a ∣ ( 4 b − 1 ) imply 2 ∣ ( 4 b − 1 ) . Consequently, 2 ∣ − 1 , which is impossible.)
Since a ∣ ( 4 b − 1 ) and b ∣ ( 4 a − 1 ) , a b ∣ ( 4 a − 1 ) ( 4 b − 1 ) .
Which implies a b ∣ ( 4 a + 4 b − 1 ) .
Therefore a b ≤ ∣ 4 a + 4 b − 1 ∣ .
Because a , b ≥ 1 , 4 a + 4 b − 1 > 0 .
Hence a b ≤ 4 a + 4 b − 1 .
Factorize and obtain ( a − 4 ) ( b − 4 ) ≤ 1 5 .
This gives us the result that if b > 4 then a ≤ 1 9 .
Thus we can consider case-by-case where b = 1 , 3 and a = 1 , 3 , 5 , 7 , 9 , 1 1 , 1 3 , 1 5 , 1 7 , 1 9 while b > 4 .
Case I : b = 1 , 3 .
If b = 1 we get a ∣ 3 and 1 ∣ ( 4 a − 1 ) . Then ( a , b ) = ( 1 , 1 ) , ( 3 , 1 ) .
If b = 3 we get a ∣ 1 1 and 3 ∣ ( 4 a − 1 ) . Then ( a , b ) = ( 1 , 3 ) .
Case II : a = 1 , 3 , 5 , 7 , 9 , 1 1 , 1 3 , 1 5 , 1 7 , 1 9 and b > 4 .
If a = 1 we get b ∣ 3 and 1 ∣ ( 4 b − 1 ) . This case is impossible.
If a = 3 we get b ∣ 1 1 and 3 ∣ ( 4 b − 1 ) . This case is impossible.
If a = 5 we get b ∣ 1 9 and 5 ∣ ( 4 b − 1 ) . Then ( a , b ) = ( 5 , 1 9 ) .
If a = 7 we get b ∣ 2 7 and 7 ∣ ( 4 b − 1 ) . Then ( a , b ) = ( 7 , 9 ) .
If a = 9 we get b ∣ 3 5 and 9 ∣ ( 4 b − 1 ) . Then ( a , b ) = ( 9 , 7 ) .
If a = 1 1 we get b ∣ 4 3 and 1 1 ∣ ( 4 b − 1 ) . This case is impossible.
If a = 1 3 we get b ∣ 5 1 and 1 3 ∣ ( 4 b − 1 ) .This case is impossible.
If a = 1 5 we get b ∣ 5 9 and 1 5 ∣ ( 4 b − 1 ) . This case is impossible.
If a = 1 7 we get b ∣ 6 7 and 1 7 ∣ ( 4 b − 1 ) . This case is impossible.
If a = 1 9 we get b ∣ 7 5 and 1 9 ∣ ( 4 b − 1 ) . Then ( a , b ) = ( 1 9 , 5 ) .
From all cases, we conclude that ( a , b ) = ( 1 , 1 ) , ( 1 , 3 ) , ( 3 , 1 ) , ( 5 , 1 9 ) , ( 7 , 9 ) , ( 9 , 7 ) , ( 1 9 , 5 ) .
Therefore, there are 7 ordered pairs satisfying the problem.
This is not the simplest way to do it, but it definitely works.
If a = b , it is easy to check ( 1 , 1 ) is the only solution.
Let a < b , then ( 4 a − 1 ) which is odd can be either of b or 3 b . (not higher since a < b )
Case 1: If 4 a − 1 = b , then from the other relation a ∣ ( 1 6 a − 5 ) ⇒ a ∣ 5 ⇒ a = 1 , 5 . This contributes to solutions ( 1 , 3 ) , ( 5 , 1 9 ) .
Case 2: If 4 a − 1 = 3 b , then from the other relation 3 a ∣ ( 1 6 a − 7 ) ⇒ 3 a ∣ ( 7 − a ) . Now we can have 7 − a = 0 , 3 a , 6 a , etc. It is easy to check integral solutions exist iff ( 7 − a ) = 0 , 6 a ⇒ a = 1 , 7 This contributes to solution ( 7 , 9 ) [ ( 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.
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).
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?
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.
you're a cheater men.
cHeater..
Problem Loading...
Note Loading...
Set Loading...
Without loss of generality,assume a ≥ b .Then a 4 b − 1 < a 4 a = 4 .But a 4 b − 1 must be odd,since it divides an odd number 4 b − 1 .Then there are 2 cases: Case 1: a 4 b − 1 = 1 In this case b ∣ 4 a − 1 = 1 6 b − 5 ⇒ b ∣ 5 .Thus,the solutions in this case are ( 3 , 1 ) and ( 1 9 , 5 ) .
Case 2: a 4 b − 1 = 3 In this case the ordered pairs that satisfy this is in form ( 4 k + 1 , 3 k + 1 ) .Then 3 k + 1 = b ∣ 4 a − 1 = 1 6 k + 3 ⇒ 3 k + 1 ∣ 1 6 ( 3 k + 1 ) − 3 ( 1 6 k + 3 ) = 7 .We have k = 0 and k = 2 ,yielding the solutions ( 1 , 1 ) and ( 9 , 7 ) .
Since in 3 of the solutions we can flip a and b ,then in total there are 1 + 2 ⋅ 3 = 7 solutions