4
$\begingroup$

It is well-known that the interated sum-of-digits function equally distributes the numbers from $1$ to $10^k-1$ to the digits $1,\ldots,9$. And this holds true for any base $b$. For example, see the nearly decade-old MO question Sum of digits iterated. I want to ask a similar question for the product of digits.

Let $\pi(n)$ be the product-of-digits function, mapping $n$ to the product of the digits of $n$, and repeating until a single digit is reached. So $\pi(13579) = 0$ because $$ 13579 \rightarrow 1 \cdot 3 \cdot 5 \cdot 7 \cdot 9 = 945 \rightarrow 9 \cdot 4 \cdot 5 = 180 \rightarrow 0 \;. $$ If $\pi( )$ is applied to all the numbers from $1$ to $m$, the distribution naturally heavily favors $0$, but is otherwise (apparently) irregular:


          DigProd10_5
          $\pi(n)$ for $n=1,\ldots,10^5-1=99999$, base $10$.
The distribution for base $5$ seems to have a more regular distribution, with the frequency of each non-zero digit monotonically increasing:
          DigProd5_7
          $\pi_5(n)$ for $n=1,\ldots,5^8-1=44444444_5$, base $5$.
The limit distribution for each base appears to be just the $0$-digit bin approaching 100%, although there are arbitrarily large numbers that avoid mapping to $0$, for example, $\pi(111\ldots111d111\ldots111) = d$. Many details remain unclear to me:

Q. What explains the differently shaped distributions for $\pi_b(n)$ in different bases $b$? Can anything general be said?

Is it the case that, in base $10$, the bins for digits $3$ and $7$ are equal, both $15$ in the example above? Why does $5$ occur more frequently than $3$ and $7$?

Why are the digit frequencies increasing with digit value in base $5$, but not, say, in base $7$?

It may be that these questions have been previously explored, in which case pointers would be welcomed.

$\endgroup$
7
  • $\begingroup$ Persistence of a number. Start with R. Guy's UPINT. Gerhard "You Know What It Means" Paseman, 2019.12.17. $\endgroup$ Dec 17 '19 at 15:19
  • $\begingroup$ Also 10 has "zero divisors", while five and other prime bases don't. So you "get more chances" at nonzero results with prime bases. I never read the paper on persistence, but the dynamic (digit multiplication) collapses when enough zero divisors are encountered, and a basic question is how long can one iterate such a dynamic before collapse (or a fixed point is reached). For base 10, it is believed there is a finite upper bound, whereas for prime bases there is more of a question. Gerhard "Zero Is A Major Sink" Paseman, 2019.12.17. $\endgroup$ Dec 17 '19 at 15:58
  • 4
    $\begingroup$ Modulo a prime, the numbers $\{0,1,\dots,p-1\}$ can be re-written as $\{0,1,g,g^2,g^3,\dots,g^{p-2}\}$ for a suitable $g$. Now, if $0$ does not occur, then the product of "digits" can be calculated in terms of the sum modulo $p-1$. $\endgroup$
    – Kapil
    Dec 17 '19 at 15:59
  • $\begingroup$ has the sum-of-digits and product-of-digits behavior already been checked in the factorial number system; any surprises to be expected there? $\endgroup$ Dec 17 '19 at 16:20
  • 1
    $\begingroup$ Clearly, 5 occurs more frequently that 3 or 7 because it is not coprime with 10: once any digit anywhere in the whole process becomes 5, the subsequent results will remain divisible by 5. Even digits occur more frequently than odd digits for the same reason. $\endgroup$ Dec 17 '19 at 16:47
1
$\begingroup$

I see now that you are asking less for persistence than for the count of orbits (or perhaps I should call them crashes).

While 3,5, and 7 are primes regardless of base (so only products involving 1 will generate them) 13, 15, and 17, are not all primes (similarly 31,51, and 71), and only one of those six numbers is a product of digits. So if you investigate this further, I think you will find the dependence on "digitally prime" numbers to be important, namely numbers (of more than one digit) which cannot be represented as a product of digits. Thus there are very few paths to three or seven (likely 1113 and the like), while there is at least one more significant path to 5 (15 and 35, thus also 75). Enumeration of base 10 "digital composites" may be a worthy endeavour.

Gerhard "And I Don't Mean Photoshop" Paseman, 2019.12.17.

$\endgroup$
2
  • $\begingroup$ Regarding the distribution shape of base five versus base seven, you might look at the numbers just before the fixed point. In base 5, (and writing in base 10), 6 and 31 and 156 lead to 1, and only the number six (in the sequence of base 5 repunits) is "base 5" digitally composite (Zsigmondy). There are more choices for 2, with at least one (121) being d.c. For base 7, you have 8 and 400 lead to 1, 9 and 15 lead to 2, 10 leads to 3, and other variations. Gerhard "A Mosaic Of Composite Orbits" Paseman, 2019.12.17. $\endgroup$ Dec 17 '19 at 16:49
  • $\begingroup$ Good point about tracking the number of paths to a particular digit. $\endgroup$ Dec 17 '19 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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