A two digit number is 18 less than the sum of the squares of its digits. How…

2024

A two digit number is 18 less than the sum of the squares of its digits. How many such numbers are there?

  1. A.

    8

  2. B.

    2

  3. C.

    3

  4. D.

    5

Attempted by 631 students.

Show answer & explanation

Correct answer: B

Let the tens digit be a (1–9) and the units digit be b (0–9). The two-digit number is 10a + b, and the condition is 10a + b = a^2 + b^2 - 18.

Rearrange to get a quadratic equation in b:

b^2 - b + (a^2 - 10a - 18) = 0.

For integer solutions b, the discriminant must be a nonnegative perfect square. The discriminant is

D = 1 - 4(a^2 - 10a - 18) = -4a^2 + 40a + 73.

Check a = 1 through 9. Only a = 4 and a = 6 give D = 169 = 13^2.

  • For a = 4: b = (1 ± 13)/2 gives b = 7 (valid). This yields the number 47, and 4^2 + 7^2 - 18 = 47.

  • For a = 6: b = (1 ± 13)/2 gives b = 7 (valid). This yields the number 67, and 6^2 + 7^2 - 18 = 67.

Therefore only the two numbers 47 and 67 satisfy the condition. Answer: 2

Explore the full course: Tcs Preparation