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

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?

• Two examples are $2.25$, $3.75$ – mfl Mar 16 at 17:26
• Thanks @mfl! But is there some way to find these numbers? (like you can find the nth term of the sequence of numbers that work) – Arale Mar 16 at 17:27
• Hint: a special number $q$ is of the form $x$, $x.5$, $x.25$ or $x.75$ where $x$ is an integer. So the sum of its digits is at most $7$ plus the sum of the digits of $x$. But the sum of the digits of $x$ is at most $x$ for $x \geq 1$. So we must have, if $x \geq 1$, $x \leq q \leq .25*(12+x) \leq 3+x/4$ so $3x/4 \leq 3$. Then only a small number of cases remain. – Mindlack Mar 16 at 17:29
• Notice that sum of digits and divided by four... since $\frac{1}{4}=0.25$ it follows that any such numbers have at most two digits to the right of the decimal point. As for digits to the left of the decimal point, you should be able to get an idea of how many possible you can have there. It will be limited due to the constraints. From that point you should be able to express the numbers in the appropriate range with a small handful of variables and use elementary-number-theory approaches to find what values are possible. – JMoravitz Mar 16 at 17:30
• Ok thank you both of you for the hints :) I will think about this very hard! – Arale Mar 16 at 17:31

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.

• Thank you for taking this question into so much detail :P – Arale Mar 16 at 19:05

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$$

• thanks for the detailed answer :P – Arale Mar 16 at 19:04