We know that 8 9 = 8 + 9 2 . Including 89 shown above, how many 2-digit integer(s) satisfy the equation a b = a + b 2 ?
Clarification:
For example, if
a
=
7
and
b
=
4
,
then
a
b
=
7
4
.
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.
@Ossama Ismail Thanks! I wrote a solution in return :)
01 also works. That makes the correct answer 2
Log in to reply
01 is not a 2 digit integer. It is a 1 digit integer. That's why it was ruled out in Case 2.
Similarly, 00 is not a 2 digit integer. I think it's a 1-digit integer, though it contradicts the rule that "integers do not start with 0".
The given condition is equation is equivalent to: 1 0 a + b = a + b 2 . That is b 2 − b − 9 a = 0 . Looking at the discriminant, it follows that 3 6 a + 1 = k 2 for some natural k. Now trying values of a from 1 to 9, the only valid value of a is 8. Thus 89 is the only number which satisfies the condition.
a b = a + b 2 1 0 ∗ a + b = a + b 2
9 ∗ a = b ∗ ( b − 1 )
There is only one solution (in case of 2-digits) which is 9 ∗ 8
While some solutions require a bit of brute force, it's possible to narrow down to 9 * 8 a little more elegantly.
a 10 + b = a + b b 9a = b*(b-1) answer a=0 b=1
00=0+0^2 and 01=0+1^2 work though.
This solution could be less terse.
In Small Basic:
For i = 1 To 9
For j = 0 To 9
x = i + j*j
y = 10*i +j
If x = y Then
TextWindow.WriteLine(y)
EndIf
EndFor
endfor
Any problem simple enough to solve by exhaustively testing all cases can be solved by exhaustively testing all cases. There's nothing invalid about this approach.
The purpose of problem solving is not to simply come up with the end answer but to find elegant ways to solve a challenging problem. This kind of an approach undermines the whole purpose of such an activity.
Note that:
1 0 a + b = a + b 2 where both a and b are one digit numbers (1) .
=> 9 a = b 2 − b
=> a = b ( b − 1 ) / 9
=> b can be 9 or b-1 can be 9.
=> b can be 9 or be can be 10.
therefore, b can only be 9 because b can be 10 is falsifying the fact (1) .
and hence, there is only one two-digit integer (w/c is 89) that satisfy the problem's condition.
Problem Loading...
Note Loading...
Set Loading...
1 0 a + b = a + b 2
b ( b − 1 ) = 9 a .
Since g cd ( b , b − 1 ) = 1 , we must either have 9 ∣ b or 9 ∣ b − 1 .
Case 1: 9 ∣ b
Since b is a digit, either b = 9 or b = 0 .
With b = 9 , a = 8 is the only solution. This works.
With b = 0 , a = 0 is the only solution, but then a b isn't a 2-digit number.
Case 2 9 ∣ b − 1
Since b is a digit, b = 1 .
With b = 1 , a = 0 is the only solution, but then a b isn't a 2-digit number.
Hence, there is only one solution a b = 8 9 .