Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let a number n $ \in\mathbb Z,$ be expressible as the sum of its digits each raised to p $ \in\mathbb N$ . How to prove or disprove that there are infinite such numbers for a particular p?

share|cite|improve this question
up vote 2 down vote accepted

For each $p$ there is a finite set of integers equal to the sum of its digits. Consider for $p=1,$ if $19\leq n\leq 99$ then $n$ has $2$ digits, whose sum can be at most $9+9=18 < n.$ If $100 \leq n \leq 999$ then $n$ has maximal digit sum $27 < n.$ It is easy to see this pattern is repeated and we never have an integer equal to its digit sum for $n\geq 19.$

If $p=2$ then for all $ 244 \leq n \leq 999$ the sum of the squares of the digits of $n$ is at most $9^2 + 9^2 +9^2 = 243 < n.$ For $1000\leq n \leq 9999$ then sum of the squares of the digits is at most $4 \cdot 9^2 = 324 < n.$ Clearly, for all $n> 243,$ $n$ is not the sum of the squares of its digits.

I leave it as an exercise to extend this idea for general $p.$

share|cite|improve this answer
If n is m digit, then the sum is at most $m9^p$ , so there is no n>$m9^p$, for which the situation is possible. OK? – Swapnanil Saha Aug 17 '12 at 14:37

For more on this, see and references there.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.