Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

(A) Determine all possible value(s) of a positive integer x, such that the sum of squares of the digits in x is equal to 2009-x.

(B) Determine all possible value(s) of a positive integer y, such that the sum of squares of the digits in y is equal to 2005-y.

In each of (A) and (B), prove that there are no other value(s) that exist.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I pretty much brute-forced it, but I eliminated a lot of possibilities, so I didn't have to try very many numbers.

First of all, note that x itself must be less than 2009. First, I tried values of x from 2000 through 2009, and none of them worked. Next, I supposed that we have a 4-digit number, ABCD (A, B, C, and D are the digits, and are thus integers from 0-9 inclusive). We can then say...

1000A + 100B + 10C + D + A2 + B2 + C2 + D2 = 2009.

A(1000 + A) + B(100 + B) + C(10 + C) + D(1 + D) = 2009

If A = 0, then we have B(100 + B) + C(10 + C) + D(1 + D) = 2009

Unfortunately, with the constraint that B, C, and D are at most 9, B(100 + B) + C(10 + C) + D(1 + D) is at most 1242, so A must be equal to 1. Knowing that A = 1, we now have:

1(1001) + B(100 + B) + C(10 + C) + D(1 + D) = 2009

B(100 + B) + C(10 + C) + D(1 + D) = 1008

Since C and D are at most 9, we can also say C(10 + C) + D(1 + D) is at most 9*19 + 9*10 = 261, which means that B(100 + B) is at least 1008 - 261 = 747. This means that B is 7, 8, or 9. Let's try all three:

B = 7: C(10 + C) + D(1 + D) = 259. C = D = 9 does not work here, and C = 9 and D = 8 is too small. No suitable solutions here.

B = 8: C(10 + C) + D(1 + D) = 144. Since D(1 + D) must be even, 144 - D(1 + D) = C(10 + C) is also even, so C is even. C = 8 yields D = 0, and upon inspection, no other values of C will work.

B = 9: C(10 + C) + D(1 + D) = 27. C(10 + C) is at most 27, so C can only be 0, 1, or 2. None of these values of C yields a suitable solution for D.

The only suitable quadruplet (A,B,C,D) is (1,9,1,3), so the only value of x that will work is x = 1880.

The math is basically the same for the 2005 problem...in fact, I just copied and pasted the above solution and changed a few numbers.

First of all, note that x itself must be less than 2005. First, I tried values of x from 2000 through 2005, and none of them worked. Next, I supposed that we have a 4-digit number, ABCD (A, B, C, and D are the digits, and are thus integers from 0-9 inclusive). We can then say...

1000A + 100B + 10C + D + A2 + B2 + C2 + D2 = 2005.

A(1000 + A) + B(100 + B) + C(10 + C) + D(1 + D) = 2005

If A = 0, then we have B(100 + B) + C(10 + C) + D(1 + D) = 2005

Unfortunately, with the constraint that B, C, and D are at most 9, B(100 + B) + C(10 + C) + D(1 + D) is at most 1242, so A must be equal to 1. Knowing that A = 1, we now have:

1(1001) + B(100 + B) + C(10 + C) + D(1 + D) = 2005

B(100 + B) + C(10 + C) + D(1 + D) = 1004

Since C and D are at most 9, we can also say C(10 + C) + D(1 + D) is at most 9*19 + 9*10 = 261, which means that B(100 + B) is at least 1004 - 261 = 743. This means that B is 7, 8, or 9. Let's try all three:

B = 7: C(10 + C) + D(1 + D) = 255. C = D = 9 does not work here, and C = 9 and D = 8 is too small. No suitable solutions here.

B = 8: C(10 + C) + D(1 + D) = 140. Since D(1 + D) must be even, 144 - D(1 + D) = C(10 + C) is also even, so C is even. Trying all possible even values for C yields no suitable solutions.

B = 9: C(10 + C) + D(1 + D) = 23. C(10 + C) is at most 23, so C can only be 0 or 1. C = 1 yields D = 3. C = 0 yields no suitable solution.

The only suitable quadruplet (A,B,C,D) is (1,9,1,3), so the only value of x that will work is x = 1913.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...