5
$\begingroup$

I define a number $x$ to be nice if $x = \text{product of digits of }x + \text{sum of digits of }x$. For example,

$$69 = (6 \times 9) + (6 + 9)$$

Motivated by the niceness of $69$, I wish to characterise all nice numbers.

I thought it would be best to slowly increase the number of digits and try to see a pattern.

$2$ Digits

$$x = \overline{ab} = 10a + b = ab + a + b \implies 9a = ab \implies 9 = b \; \text{as} \; a \neq 0$$ $$\therefore x = \{19, 29, 39, ..., 99\}$$

$3$ Digits

$$x = \overline{abc} = 100a + 10b + c = abc + a + b + c \implies 99a + 9b = abc \implies 11a + b = \frac{abc}{9}$$

Testing $0 \le a, b, c \in \mathbb{Z} \le 9$ and $a \neq0$ s.t. $\frac{abc}{9} \in \mathbb{Z}$, I find no solutions exist.

It seems that as we increase the number of digits, no more nice numbers exist. How do I prove this?

Other interesting questions I thought of:

  • nice numbers in different base systems?
  • considering clusters of digits instead of individual digits?

You don’t have to answer these questions, but if you want to give any insights on them, feel free to do so.

$\endgroup$
6
  • 3
    $\begingroup$ $69$ is a nice number for entirely different reasons that I can't go into on a family-friendly website. :) $\endgroup$
    – Deepak
    Jun 28, 2022 at 11:18
  • 2
    $\begingroup$ @Deepak Indeed, mathematical inspiration can stem from anywhere! $\endgroup$
    – user905694
    Jun 28, 2022 at 11:19
  • 2
    $\begingroup$ This is a finite problem. Should be easy to argue that, for sufficiently large $n$, the product of the digits plus the sum of the digits is $<n$. then it's just a search. $\endgroup$
    – lulu
    Jun 28, 2022 at 11:19
  • 2
    $\begingroup$ Small Generalisation: Let $\overline {a9}$ be any m-digit number such that a is an (m—1) digit number. Then $a\times 9+a+9= \overline {a9}$. Eg. $7476487364839= 747648736483\times 9+ 747648736483+9.$ $\endgroup$ Jun 28, 2022 at 11:22
  • 1
    $\begingroup$ Re the modified question: simplistic bounds don't help that much...we get to length $22$ or something like that, too much to search conveniently. But...well, take length $3$. The max of your function is attained at $999$ and we get $756$. But if $n≤756$ then the max is attained at $699$ which yields $510$, and so on. For each length the calculation is easy enough, and it gets easier with greater lengths. Absent a better idea, this should work out quickly enough. $\endgroup$
    – lulu
    Jun 28, 2022 at 12:46

3 Answers 3

1
$\begingroup$

I think it's easy to generalise to two digits in any base.

Let $n = \overline{ab}$ be a two digit number in base $r$, with $a$ and $b$ digits in base $r$ (i.e. $a,b \in \mathbb Z$, $0<a<r$ and $0\leq b<r$).

Then $n = ra+b$, if we want niceness of $n$, we must have $n=ab+(a+b)$, so we get the equation: $ra+b=ab+a+b$ from which we can easily see that $b=r-1$.

The sum of the product and sum of the digits for an $m$-digit number in base $r$ is limited by $m(r-1)+(r-1)^m$, and the $m$-digit numbers in base $r$ are $r^{m-1}$ to $r^m-1$. It's clear that the latter two expressions grow faster than the first, so for any base there will be a limit to how many digits nice numbers can have. But for $r=10$ this only allows us to conclude that the number must have fewer than $22$ ($\log_{\frac{10}{9}} 10$) digits.

$\endgroup$
0
$\begingroup$

For an $n$-digit number the product plus the sum of digits is at most $9^n + 9n$. If the first two digits are $a$ and $b$, then $x \ge (10a+b)\cdot10^{n-2}$ while the sum is less than $ab\cdot9^{n-2} + a+b+9(n-2)$.

You can easily show that the sum is less than $x$ when $x \ge 100$.

$\endgroup$
0
$\begingroup$

You need $\sum_{r=0}^{n-1}10^ra_r = a_{n-1}\prod_{r=0}^{n-2}a_r+\sum_{r=0}^{n-1}a_r$, so $$a_{n-1}\Big(10^{n-1}-\prod_{r=0}^{n-2}a_r-1\Big)+\sum_{r=1}^{n-2}(10^r-1)a_r = 0.$$ But every term on the left hand side is positive for $n>2$ since $10^{n-1}-1$ is larger than the product of $n-1$ digits all less than $10$ (except for $n=2$). This argument works in every base: just replace $10$ by $b$ to see that $n$ cannot be larger than 2, and if $n=2$, $a_0=b-1$, with any $a_1$.

$\endgroup$

You must log in to answer this question.