Prime Concatenation Order

196 Views Asked by At

Consider the following procedure.

Given an integer $n \geq 2$, obtain the canonical prime factorization of $n$, i.e. $\prod_{i=1}^k p_i^{e_i}$. Take the distinct factors $p_i$ and list them in ascending order. Concatenate them into a new integer. That is, 2 and 5 becomes 25, 3 and 7 becomes 37, and so on. If the constructed integer is prime, halt, otherwise factor this integer and repeat the process until the result is prime. For lack of a better name, I'll call the number of times this process must repeat until the result is prime the "prime concatenation order."

Clearly prime numbers have prime concatenation order 0 since the process halts immediately.

Applying this process to the integers 2 to 30 yields the following list:

0 0 1 0 1 0 1 1 2 0 1 0 2 4 1 0 1 0 2 1 1 0 1 1 4 1 2 0 2

My friend generated the output for a lot of numbers. The list can be viewed for input up to 329 here. The input, the prime the process halts with, and the order are given. The majority of the orders seem to be 5 or less, but there are exceptions such as 91, which has order 64, and 186, which has order 63. The input 330 will have order greater than 66.

My primary question is: Is this process guaranteed to halt for any given input?

Other ancillary questions are: Does this already have a name? Can anything else be proved about it?

1

There are 1 best solutions below

1
On

Heuristically it should not be uncommon for the sequence to grow a lot: Given a typical $n$, the probability that for a prime divisor $p$ of $n$ we actually have $p^2\mid n$ is quite low (namely $\frac1p$) except for the first few primes. If $p$ is a $k$-digit prime then the "contribution" of $p$ to $n$ is therefore a factor $p<10^k$ whereas its contribution to the next term in sequence is another $k$ digits, so at least a factor of $10^k$. Remarkably, even for $p=2$, where the occurance of $4\mid n$ or $8\mid n$ is not so unlikely, the contribution to $n$ is still $<10$ and that to the next term is $>10$.