- #1
DarrenM
- 81
- 1
Not homework, but a really neat problem I stumbled across. MAA has a Facebook thing-- page? I don't know, I only use Facebook to share pictures with my family and read about the MAA stuff. They post problems often, some of which are very cool. Such as this one.
A number of three digits in base 7 has the same three digits in reverse order when expressed in base 9. What is the number?
I re-phrased the question as follows:
Let n be an integer in base 10 such that n = abc7 and n = cba9. What is n?
I've got two approaches; a brute force approach that I used and another that a friend and I came up with. I'd love something a bit more generalized. Someone on Facebook said they had three distinct solutions. So...
i. I started by looking for some boundaries. By definition, the only integers we can use for base 7 are 0-6. So, 6667 = 34210 is our upper bound. But, 6009 = 48610. So, c cannot be 6. By the same argument c cannot be 5.
From the problem stating that both abc7 and cba9 are three digits, I don't think that a and c can be 0.
These are the restrictions I came up with:
1 < a < 6
0 < b < 6
1 < c < 4
I flailed around a bit, and decided to try this: Three number lines
Base 10 --------------------------------------
Base 7 ---------------------------------------
Base 9 ---------------------------------------
I had an upper and lower boundary, so I checked the base 10 value of 1007, 2007, 3007, 4007, 5007, and 6007. Then I checked 1009, 2009, 3009, and 4009. I was looking for base 10 values that appeared to converge. 5007 and 3009 were very close; 245 and 243 in base 10, respectively. Since the base 7 and base 9 numbers have to be inverted, I tried 5037 and 3059 and was successful: 24810.ii.
I kept the same restrictions in mind from approach (i).
1 < a < 6
0 < b < 6
1 < c < 4
Let n = abc7 and n = cba9. Then,
n = a72 + b71 + c70 = 49a + 7b + c and
n = c92 +b91 + c90 = 81c + 9b + a.
So, 49a +7b + c = 81c + 9b + a. Or,
48a -2b -80c = 0.
Then, b = 24a -40c = 8(3a-5c)
Then, b/8 = 3a-5c.
But, a, b, and c are all integers. So, 3a is an integer, 5c is an integer, and 3a-5c is an integer. So, b/8 must be an integer, and an integer divisible by 8. The only integer in the boundaries of b that meets that criteria is 0. Therefore, b = 0.
So,
3a-5c = 0
3a=5c
So, a = 5 and c=3. Comments: (i) is really ugly. It felt kind of like... well, like trying to get into a room and accomplishing that by kicking the door in. Sure, it works, but you feel a bit silly when someone walks up behind you with the key.
(ii) is the result of trying to find a solution that wasn't quite so ugly, and one that, perhaps, yielded a more generalized result. Am I correct in thinking that this solution is the only nontrivial answer to the problem? Someone claimed to have found three solutions, but I can't for the life of me see how.
Finally, is there a still better way of approaching this problem?
Homework Statement
A number of three digits in base 7 has the same three digits in reverse order when expressed in base 9. What is the number?
Homework Equations
I re-phrased the question as follows:
Let n be an integer in base 10 such that n = abc7 and n = cba9. What is n?
The Attempt at a Solution
I've got two approaches; a brute force approach that I used and another that a friend and I came up with. I'd love something a bit more generalized. Someone on Facebook said they had three distinct solutions. So...
i. I started by looking for some boundaries. By definition, the only integers we can use for base 7 are 0-6. So, 6667 = 34210 is our upper bound. But, 6009 = 48610. So, c cannot be 6. By the same argument c cannot be 5.
From the problem stating that both abc7 and cba9 are three digits, I don't think that a and c can be 0.
These are the restrictions I came up with:
1 < a < 6
0 < b < 6
1 < c < 4
I flailed around a bit, and decided to try this: Three number lines
Base 10 --------------------------------------
Base 7 ---------------------------------------
Base 9 ---------------------------------------
I had an upper and lower boundary, so I checked the base 10 value of 1007, 2007, 3007, 4007, 5007, and 6007. Then I checked 1009, 2009, 3009, and 4009. I was looking for base 10 values that appeared to converge. 5007 and 3009 were very close; 245 and 243 in base 10, respectively. Since the base 7 and base 9 numbers have to be inverted, I tried 5037 and 3059 and was successful: 24810.ii.
I kept the same restrictions in mind from approach (i).
1 < a < 6
0 < b < 6
1 < c < 4
Let n = abc7 and n = cba9. Then,
n = a72 + b71 + c70 = 49a + 7b + c and
n = c92 +b91 + c90 = 81c + 9b + a.
So, 49a +7b + c = 81c + 9b + a. Or,
48a -2b -80c = 0.
Then, b = 24a -40c = 8(3a-5c)
Then, b/8 = 3a-5c.
But, a, b, and c are all integers. So, 3a is an integer, 5c is an integer, and 3a-5c is an integer. So, b/8 must be an integer, and an integer divisible by 8. The only integer in the boundaries of b that meets that criteria is 0. Therefore, b = 0.
So,
3a-5c = 0
3a=5c
So, a = 5 and c=3. Comments: (i) is really ugly. It felt kind of like... well, like trying to get into a room and accomplishing that by kicking the door in. Sure, it works, but you feel a bit silly when someone walks up behind you with the key.
(ii) is the result of trying to find a solution that wasn't quite so ugly, and one that, perhaps, yielded a more generalized result. Am I correct in thinking that this solution is the only nontrivial answer to the problem? Someone claimed to have found three solutions, but I can't for the life of me see how.
Finally, is there a still better way of approaching this problem?