Find all the numbers that are equal to one quarter of the sum of their own digits

144 Views Asked by At

The number $1.5$ is special because it is equal to one quarter of the sum of its digits, as $1+5=6$ and $\frac{6}{4}=1.5$ .Find all the numbers that are equal to one quarter of the sum of their own digits.

I was puzzling over this question for a while, but I couldn't find a formula without using the $\sum$ , but I can't really solve generalizations, only come up with them. The only thing I could come up with was to brute-force it, but I can't really come up with any 'special' numbers. Any help?

2

There are 2 best solutions below

1
On BEST ANSWER

My first draft was messy.

With hindsight.

Let $N = \frac {K}4 = M\frac i4$ where $K$ is the sum of the digits. $M$ is the quotient integer of dividing $K$ by $4$ and $i=0,1,2,3$ is the fractional remainder.

Note: $K$ is the sum of the digits of $N$ which is also the sum of the digits of $M$ plus the sum of the digits of $\frac i4$.

So $4N = 4M + i =K$. If the digits of $M$ are $d_k$ then

$4N = 4M + i=4d_m \times 10^m + ..... + 4d_1\times 10 + 4d_0 + \begin{cases}0\\ 1\\ 2\\ 3\end{cases}$

While $K =d_m + ..... + d_1 + d_0 +\text{sum of the digits of }\frac i4$ so

$4d_m \times 10^m + ..... + 4d_1\times 10 + 4d_0 + \begin{cases}0\\ 1\\ 2\\ 3\end{cases}=d_m + ..... + d_1 + d_0 +\text{sum of the digits of }\frac i4$

$d_m(4\cdot 10^m-1) + .... d_1(40 -1) + 3d_0 + \begin{cases}0\\ 1\\ 2\\ 3\end{cases}= \text{sum of the digits of }\frac i4$

But $\text{sum of the digits of }\frac i4 =\begin{cases}0\\2+5=7\\5\\7+5=12\end{cases}$

So we have $d_m(4\cdot 10^m-1) + .... d_1(40 -1) + 3d_0 = \begin{cases}0-0=0\\2+5-1=6\\5-2=3\\7+5-3=9\end{cases}$

But the RHS is less than $10$ so none of the $d_{k_{k> 0}}$ can be none zero and $M$ is a single digit, $d_0$.

And we have

$3d_0 = \begin{cases}0\\6\\3\\9\end{cases}$

So $M=d_0 = \begin{cases}0\\2\\1\\3\end{cases}$

ANd $N = M +\frac i4 = \begin{cases}0\\2.25\\1.5\\3.75\end{cases}$

==== first answer below (more thought and scrabble and not as slick-- a "rough draft")=====

So the sum of the digits is an integer. And and integer divided by $4$ will result in four possible cases.

$\frac {integer}4 = \begin{cases}n.00\\n.25\\n.5\\n.75\end{cases}$.

So the least power of $10$ in the number can be $-2$.

So let $N = \sum_{k=-2}^m a_k\times 10^m$ (where $a_m \ne 0$ but the other $a_k$ may be).

$ \sum_{k=-2}^m a_k\times 10^m = \frac {\sum_{k=-2}a_k}4< \frac{9\times (m+2)}4$ but even more so $a_{-1}+ a_{-2} \le 7+5 = 12$ so $N < 9m + 12$ and $a10^m \le N < \frac {9m + 12}4<3m + 3$ can give us an upper limit of $m$.

If $m \ge 2$ then $3m + 3 < 10^m$ obviously so $m\le 1$. If $m =1$ then $10a_1 < 6$ is impossible. SO $m\le 0$

So we have four cases:

$N = a.00$ and so $a = \frac 14 a$ and $a = 0$ and $N = 0$. That's a solution.

$N = a.25$ and $a +\frac 14 = \frac 14(a + 7)$ so $4a+1=a+7$ so $3a=6$ so $a=2$ and $N = 2.25$ yield $2.25 =\frac 14 \times 9$. That's a solution.

$N = a.5$ and $a + \frac 12 = \frac 14(a+5)$ so $4a + 2 = a+5$ so $3a = 3$ and $a = 1$ and $N=1.5$ yields your solution.

$N = a.75$ and $a + \frac 34 =\frac 14(a+12)$ so $4a + 3=(a+12)$ so $3a =9$ and $a = 3$ and $N=3.75 = 3\frac 34 = \frac {15}4 = \frac {3+7+5}4$ is a solution.

Pretty cool and pretty cute.

1
On

This is not much better than a brute force method:

  • The sum of the digits $S$ is a non-negative integer, so a quarter of it $\frac{S}4$ is non-negative, of the form $x$ or $x.25$ or $x.5$ or $x.75$ for some non-negative integer $x$.

  • We must have $x < 10$ since if $10 \le x\lt 100$ then $40 \le 4x \le S \lt 412$ so the sum of the digits of $x$ must be at least $40-12=28$ but two-digit integers have sums of digits no more than $18$. Similarly with larger $x$.

    • So a satisfactory $x$ has sum of digits $4x=S=x$ with solution $x=0$
    • and a satisfactory $x.25$ has sum of digits $4(x+\frac14)=S=x+7$ with solution $x=2$
    • and a satisfactory $x.5$ has sum of digits $4(x+\frac12)=S=x+5$ with solution $x=1$
    • and a satisfactory $x.75$ has sum of digits $4(x+\frac34)=S=x+12$ with solution $x=3$

making the numbers which work $$0, \quad2.25,\quad 1.5,\quad 3.75$$