Browse · MathNet
PrintMathematica competitions in Croatia
Croatia algebra
Problem
Determine all positive integers smaller than that are equal to the sum of squares of their digits.
Solution
Let be a positive integer less than such that is equal to the sum of the squares of its digits.
Let have digits , , (possibly with leading zeros), so , where , , , and .
We want .
Let us check all possible :
- For with digits, . The maximum sum of squares of digits is , so cannot be a -digit number. - For with digits, , . The maximum sum is , so possible. - For with digit, , , so or , but must be positive, so .
Let us check all from to :
For to : - : ✓ - : ✓ - : ✓
For to : Let , . So . Rewriting: . Try from to :
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Already checked.
For : Already checked.
For : Already checked.
For : Already checked.
Alternatively, try all from to and check if for digits.
Let us try : Digits: . .
Try : .
Try : .
Try : .
Try : .
Try : .
Try to : But as above, the maximum sum of squares for digits is , so cannot be digits.
Now, try all from to : Let us check for where and are digits and .
Alternatively, list all possible and compute , and check if .
Let us try from to , from to :
For : or So or (but must be positive), so .
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Already checked.
For : Already checked.
For : Already checked.
For : Discriminant: , not a perfect square.
Therefore, the only possible are , , and .
Thus, the positive integers less than that are equal to the sum of the squares of their digits are:
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .
However, upon checking, only , , and satisfy the condition for .
Final answer:
, , .
Let have digits , , (possibly with leading zeros), so , where , , , and .
We want .
Let us check all possible :
- For with digits, . The maximum sum of squares of digits is , so cannot be a -digit number. - For with digits, , . The maximum sum is , so possible. - For with digit, , , so or , but must be positive, so .
Let us check all from to :
For to : - : ✓ - : ✓ - : ✓
For to : Let , . So . Rewriting: . Try from to :
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Already checked.
For : Already checked.
For : Already checked.
For : Already checked.
Alternatively, try all from to and check if for digits.
Let us try : Digits: . .
Try : .
Try : .
Try : .
Try : .
Try : .
Try to : But as above, the maximum sum of squares for digits is , so cannot be digits.
Now, try all from to : Let us check for where and are digits and .
Alternatively, list all possible and compute , and check if .
Let us try from to , from to :
For : or So or (but must be positive), so .
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Discriminant: , not a perfect square.
For : Already checked.
For : Already checked.
For : Already checked.
For : Discriminant: , not a perfect square.
Therefore, the only possible are , , and .
Thus, the positive integers less than that are equal to the sum of the squares of their digits are:
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .
However, upon checking, only , , and satisfy the condition for .
Final answer:
, , .
Final answer
1, 4, 9
Techniques
IntegersQuadratic functionsLinear and quadratic inequalities