Base a a and b b , next level

In base a a , a number is written as 11 7 a 117_a . The same number in base b b is 18 8 b 188_b .

Write the number a a in base b b .


Inspiration


The answer is 13.

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.

3 solutions

Arjen Vreugdenhil
Aug 23, 2017

Clearly, a > b a > b . We must solve a 2 + a + 7 = b 2 + 8 b + 8 a^2 + a + 7 = b^2 + 8b + 8 for positive integers a a , b b .

Reduce the equation to zero: ( a 2 b 2 ) + a 8 b 1 = 0. (a^2 - b^2) + a - 8b - 1 = 0. Factor the difference of squares: ( a + b ) ( a b ) + a 8 b 1 = 0. (a + b)(a - b) + a - 8b - 1 = 0. Write a 8 b a - 8b also in terms of the sum and difference: ( a + b ) ( a b ) 7 2 ( a + b ) + 9 2 ( a b ) 1 = 0. (a + b)(a - b) - \frac72(a + b) + \frac92(a - b) - 1 = 0. This invites to a factorization in the form ( a + b + ) ( a b + ) = (a + b + \dots)(a - b + \dots) = \dots : ( a + b + 9 2 ) ( a b 7 2 ) + 63 4 1 = 0. \left(a + b + \frac92\right)\left(a - b - \frac72\right) + \frac{63}{4} - 1 = 0. Multiply everything by 2 2 = 4 2\cdot 2 = 4 : ( 2 a + 2 b + 9 ) ( 2 a 2 b 7 ) = 59. (2a + 2b + 9)(2a - 2b - 7) = -59. Since both factors are integers and 59 59 is prime, we have only four factorizations: 59 = ± 59 1 59 = \pm 59\cdot \mp 1 or ± 1 59 \pm 1\cdot \mp 59 . But 2 a + 2 b + 9 2a + 2b + 9 is certainly greater than 9; therefore, only one possibility remains: { 2 a + 2 b + 9 = 59 2 a 2 b 7 = 1 { a = 14 b = 11 . \begin{cases} 2a + 2b + 9 = 59 \\ 2a - 2b - 7 = -1 \end{cases}\ \ \ \therefore\ \ \ \begin{cases} a = 14 \\ b = 11 \end{cases}.

Check the solution: 11 7 14 = 1 4 2 + 14 + 7 = 217 ; 18 8 11 = 1 1 2 + 8 11 + 8 = 217. 117_{14} = 14^2 + 14 + 7 = 217;\ \ \ 188_{11} = 11^2 + 8\cdot 11 + 8 = 217.

Answer : We post a = 1 4 10 = 13 11 a = 14_{10} = \boxed{13}_{11} .


Alternative solution . Suppose a = b + d 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 ) . a^2 + a + 7 = (b + d)^2 + (b + d) + 7 = b^2 + (2d + 1)b + (d^2 + d + 7). Compare this to 18 8 b 188_b , accounting for the possible "carry" c c from the last to the middle digit: { 2 d + 1 + c = 8 d 2 + d + 7 = b c + 8 \begin{cases} 2d + 1 + c = 8 \\ d^2 + d + 7 = bc + 8 \end{cases} From the first equation we see that c c is odd; in fact, the possibilities are limited to ( c , d ) = ( 1 , 3 ) ; ( 3 , 2 ) ; ( 5 , 1 ) (c,d) = (1,3);\ (3,2);\ (5,1) . Try solving the second equation for b b in each of these three cases:

  • 3 2 + 3 + 7 = b + 8 19 = b + 8 b = 11 3^2 + 3 + 7 = b + 8 \ \ \ \therefore\ \ \ 19 = b + 8\ \ \ \therefore\ \ \ b = 11 ;

  • 2 2 + 2 + 7 = 2 b + 8 2^2 + 2 + 7 = 2b + 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 = 1 3 1^2 + 1 + 7 = 3b + 8 \ \ \ \therefore\ \ \ 9 = 3b + 8\ \ \ \therefore\ \ \ b = \tfrac13 is not an integer.

The only valid solution, then, is b = 11 b = 11 and d = 3 d = 3 , so that a = 1 d b = 13 11 a = \overline{1d}_b = \boxed{13}_{11} .

Nice solution. I personally find it easier to obtain ( 2 a + 2 b + 9 ) ( 2 a 2 b 7 ) = 59 (2a + 2b + 9)(2a-2b-7) = -59 if I do this:

Multiply the equation a 2 + a + 7 = b 2 + 8 b + 8 a^2+a+7 = b^2 + 8b + 8 by 4, then complete the square:

4 a 2 + 4 a + 28 = 4 b 2 + 32 b + 32 ( 2 a + 1 ) 2 + 27 = ( 2 b + 4 ) 2 32 ( 2 a + 1 ) 2 ( 2 b + 4 ) 2 = 59 \begin{aligned} 4a^2 + 4a + 28 & = & 4b^2 + 32b + 32 \\ (2a+1)^2 + 27 &=& (2b+4)^2 - 32 \\ (2a+1)^2 - (2b+4)^2 &= &-59 \\ \end{aligned}

The penultimate is to apply the difference of 2 squares identity.

Pi Han Goh - 1 year, 4 months ago
Pi Han Goh
Feb 5, 2020

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 ) (a,b) satisfying a 2 + a + 7 = b 2 + 8 b + 8 a^2 + a + 7 = b^2 + 8b + 8 . Rearranging this equation gives b 2 ( 1 ) + b ( 8 ) + ( a 2 a + 1 ) = 0 b^2 (1) + b (8) + (-a^2 - a + 1) = 0

The discriminant (in b b ) must be a perfect square. That is, there is an integer c 0 c\geqslant 0 satisfying

8 2 4 ( 1 ) ( a 2 a + 1 ) = c 2 4 a 2 + 4 a + 60 = c 2 8^2 - 4(1)(-a^2 - a + 1) = c^2 \quad \Rightarrow \quad 4a^2 + 4a + 60 = c^2

Since LHS is divisible by 4, then so must RHS. Thus, c c must be even, c = 2 d c = 2d ,

4 a 2 + 4 a + 60 = ( 2 d ) 2 a 2 + a + 15 = d 2 a 2 ( 1 ) + a ( 1 ) + ( d 2 + 15 ) = 0 4a^2 + 4a + 60 = (2d)^2 \quad \Rightarrow \quad a^2 + a + 15 = d^2 \quad \Rightarrow \quad a^2 (1) + a(1) + (-d^2+ 15) = 0

Again, the discriminant must be a perfect square,

1 2 4 ( 1 ) ( d 2 + 15 ) = e 2 ( 2 d ) 2 e 2 = 59 ( 2 d + e ) ( 2 d e ) = 59 1^2 - 4(1)(-d^2 + 15) = e^2 \quad \Rightarrow \quad (2d)^2 - e^2 = 59 \quad \Rightarrow \quad (2d+e)(2d-e) = 59

Since 59 is prime, then

{ 2 d + e = 59 2 d e = 1 ( d , e ) = ( 15 , 29 ) c = 30 a = 14 b = 11 a = 11 + 3 = 13 b \begin{cases} 2d + e = 59 \\ 2d - e = 1 \end{cases} \quad \Rightarrow \quad (d,e) = (15,29) \quad \Rightarrow \quad c = 30 \quad \Rightarrow \quad a = 14 \quad \Rightarrow \quad b = 11 \quad \Rightarrow \quad a = 11 + 3 = \boxed{13}_b

Giorgos K.
Jan 3, 2018

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 x .

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include<stdio.h>

int main() {
    int a,b;

    for (a = 8; a < 1000; a++) for (b = 9; b < a; b++)
        if ((1*a + 1)*a + 7 == (1*b + 8)*b + 8)
            printf("%d %d\n",a,b);
    return 0;
}

Arjen Vreugdenhil - 3 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...