# Numbers whose product of digits is a multiple of sum of digits

Find three consecutive numbers, greater than 10 and none with a digit 0 in it, each of which is such that the product of its digits is a multiple of the sum of its digits.

What about four or more such numbers?

Three numbers

Observe that:

The product $$P$$ can only have prime factors less than $$10$$, meaning $$2$$, $$3$$, $$5$$ and $$7$$. Therefore, the same has to be true for the sum $$S$$.

Moreover:

The sums $$S_1, S_2, S_3$$ have to be consecutive, or else one of the numbers would end in a $$0$$. In fact, if $$n_1 < n_2 < n_3$$ are the integers, this argument also shows that $$S_1 < S_2 < S_3$$ are in the same increasing order.

So we can start by finding...

... three consecutive integers $$S_1, S_2, S_3$$ all of whose prime divisors are among $$2$$, $$3$$, $$5$$ and $$7$$.
It is also clear that the $$S_i$$ cannot be themselves one of the numbers $$2, 3, 5, 7$$, because the condition that $$S_i$$ divides $$P_i$$ would force one of the digits to equal $$S_i$$, and then the number is less than $$10$$, which is not allowed.

At this point it is worth noting that:

By Størmer's Theorem, even for two such consecutive numbers $$S_1, S_2$$, there are only finitely many possibilities, which can in principle be found algorithmically.

So we search and find that

The first such triplets of consecutive integers $$S_1, S_2, S_3$$ is $$14,15,16$$.

Now observe that:

The smaller number $$n_1$$, whose digit sum is $$S_1 = 14$$, has to have a digit equal to $$7$$. The number $$n_2$$ has to have a digit equal to $$5$$ and a digit divisible by $$3$$. If the last digit of $$n_1$$ were a $$7$$, then we would have $$S_1 \geq 3+5+7$$ so this is not possible. If another digit were a $$7$$, then we get $$S_2 \geq 7 + 3 + 5$$ which is fine, and shows that $$n_2$$ must be consist of the digits $$3, 5, 7$$. But then $$P_3$$ is not divisible by $$16$$.

So:

We keep looking and find that the next triplet is $$48, 49, 50$$.

With this much flexibility for choosing digits, some trial and error gives

\begin{align*}n_1 &= 5578896\\ n_2 &= 5578897\\ n_3 &= 5578898\end{align*}

Four or more numbers

Using the remark above:

We can use an algorithm to compute all the pairs $$S_1, S_2$$ of consecutive integers that are only divisible by primes $$2, 3, 5, 7$$. I used the code here: https://11011110.github.io/blog/2007/03/19/strmers-algorithm.html

We obtain:

1, 2
2, 3
3, 4
4, 5
5, 6
6, 7
7, 8
8, 9
9, 10
14, 15
15, 16
20, 21
24, 25
27, 28
35, 36
48, 49
49, 50
63, 64
80, 81
125, 126
224, 225
2400, 2401
4374, 4375
In particular, the only such triples of consecutive numbers greater than $$10$$ are (14, 15, 16) and (48, 49, 50), and there are no consecutive quadruples!