In base a , a number is written as 1 1 7 a . The same number in base b is 1 8 8 b .
Write the number a in base b .
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.
Nice solution. I personally find it easier to obtain ( 2 a + 2 b + 9 ) ( 2 a − 2 b − 7 ) = − 5 9 if I do this:
Multiply the equation a 2 + a + 7 = b 2 + 8 b + 8 by 4, then complete the square:
4 a 2 + 4 a + 2 8 ( 2 a + 1 ) 2 + 2 7 ( 2 a + 1 ) 2 − ( 2 b + 4 ) 2 = = = 4 b 2 + 3 2 b + 3 2 ( 2 b + 4 ) 2 − 3 2 − 5 9
The penultimate is to apply the difference of 2 squares identity.
In this solution, I will be using the following statement repeatedly.
If a quadratic equation has integer solution, then its (quadratic) discriminant must be a perfect square.
We want to find positive integers ( a , b ) satisfying a 2 + a + 7 = b 2 + 8 b + 8 . Rearranging this equation gives b 2 ( 1 ) + b ( 8 ) + ( − a 2 − a + 1 ) = 0
The discriminant (in b ) must be a perfect square. That is, there is an integer c ⩾ 0 satisfying
8 2 − 4 ( 1 ) ( − a 2 − a + 1 ) = c 2 ⇒ 4 a 2 + 4 a + 6 0 = c 2
Since LHS is divisible by 4, then so must RHS. Thus, c must be even, c = 2 d ,
4 a 2 + 4 a + 6 0 = ( 2 d ) 2 ⇒ a 2 + a + 1 5 = d 2 ⇒ a 2 ( 1 ) + a ( 1 ) + ( − d 2 + 1 5 ) = 0
Again, the discriminant must be a perfect square,
1 2 − 4 ( 1 ) ( − d 2 + 1 5 ) = e 2 ⇒ ( 2 d ) 2 − e 2 = 5 9 ⇒ ( 2 d + e ) ( 2 d − e ) = 5 9
Since 59 is prime, then
{ 2 d + e = 5 9 2 d − e = 1 ⇒ ( d , e ) = ( 1 5 , 2 9 ) ⇒ c = 3 0 ⇒ a = 1 4 ⇒ b = 1 1 ⇒ a = 1 1 + 3 = 1 3 b
Mathematica
For[x=4,x<300,x++,
For[a=2,a<x,a++,
For[b=2,b<x,b++,
If[IntegerDigits[x,a]=={1,1,7}&&IntegerDigits[x,b]=={1,8,8},
Print[x, " ", "a=", a, " ", "b=", b]]]]]
217 a=14 b=11
The following code is more efficient; it avoids a third loop over x .
1 2 3 4 5 6 7 8 9 10 |
|
Problem Loading...
Note Loading...
Set Loading...
Clearly, a > b . We must solve a 2 + a + 7 = b 2 + 8 b + 8 for positive integers a , b .
Reduce the equation to zero: ( a 2 − b 2 ) + a − 8 b − 1 = 0 . Factor the difference of squares: ( a + b ) ( a − b ) + a − 8 b − 1 = 0 . Write a − 8 b also in terms of the sum and difference: ( a + b ) ( a − b ) − 2 7 ( a + b ) + 2 9 ( a − b ) − 1 = 0 . This invites to a factorization in the form ( a + b + … ) ( a − b + … ) = … : ( a + b + 2 9 ) ( a − b − 2 7 ) + 4 6 3 − 1 = 0 . Multiply everything by 2 ⋅ 2 = 4 : ( 2 a + 2 b + 9 ) ( 2 a − 2 b − 7 ) = − 5 9 . Since both factors are integers and 5 9 is prime, we have only four factorizations: 5 9 = ± 5 9 ⋅ ∓ 1 or ± 1 ⋅ ∓ 5 9 . But 2 a + 2 b + 9 is certainly greater than 9; therefore, only one possibility remains: { 2 a + 2 b + 9 = 5 9 2 a − 2 b − 7 = − 1 ∴ { a = 1 4 b = 1 1 .
Check the solution: 1 1 7 1 4 = 1 4 2 + 1 4 + 7 = 2 1 7 ; 1 8 8 1 1 = 1 1 2 + 8 ⋅ 1 1 + 8 = 2 1 7 .
Answer : We post a = 1 4 1 0 = 1 3 1 1 .
Alternative solution . Suppose a = b + d . We must solve a 2 + a + 7 = ( b + d ) 2 + ( b + d ) + 7 = b 2 + ( 2 d + 1 ) b + ( d 2 + d + 7 ) . Compare this to 1 8 8 b , accounting for the possible "carry" c from the last to the middle digit: { 2 d + 1 + c = 8 d 2 + d + 7 = b c + 8 From the first equation we see that c is odd; in fact, the possibilities are limited to ( c , d ) = ( 1 , 3 ) ; ( 3 , 2 ) ; ( 5 , 1 ) . Try solving the second equation for b in each of these three cases:
3 2 + 3 + 7 = b + 8 ∴ 1 9 = b + 8 ∴ b = 1 1 ;
2 2 + 2 + 7 = 2 b + 8 has no solution, since left side is odd by right side is even.
1 2 + 1 + 7 = 3 b + 8 ∴ 9 = 3 b + 8 ∴ b = 3 1 is not an integer.
The only valid solution, then, is b = 1 1 and d = 3 , so that a = 1 d b = 1 3 1 1 .