We've had powerful numbers, yes, but what about highly powerful numbers?
Highly powerful numbers
Let \$n\$ be a positive integer in the form
$$n = p_1^{e_{p_1}(n)}p_2^{e_{p_2}(n)}\cdots p_k^{e_{p_k}(n)}$$
for distinct, increasing primes \$p_1, p_2, ..., p_k\$ and, where \$e_{p_i}(n)\$ is a positive integer for all \$i = 1, 2, ..., k\$. Note that we don't include zero exponents here.
Now, for such an \$n\$, define
$$\operatorname{prodexp}(n) = \begin{cases} 1, & n = 1 \\ \prod^k_{i=1} e_{p_i}(n), & n > 1\end{cases}$$
Such an \$n\$ is said to be highly powerful if, for all \$1 \le m < n\$, \$\operatorname{prodexp}(m) < \operatorname{prodexp}(n)\$.
For example, \$n = 8\$ is a highly powerful number as we have \$\operatorname{prodexp}(n) = 3\$ and
\$m\$ | \$\operatorname{prodexp}(m)\$ |
---|---|
\$1\$ | \$1\$ |
\$2\$ | \$1\$ |
\$3\$ | \$1\$ |
\$4\$ | \$2\$ |
\$5\$ | \$1\$ |
\$6\$ | \$1\$ |
\$7\$ | \$1\$ |
All of which are strictly less than \$3 = \operatorname{prodexp}(8)\$. Whereas \$n = 7\$ is not highly powerful as \$\operatorname{prodexp}(7) = 1 < 2 = \operatorname{prodexp}(4)\$.
The first few highly powerful numbers are
1, 4, 8, 16, 32, 64, 128, 144, 216, 288, 432, 864, 1296, 1728, 2592
This is A005934 on OEIS.
This is a standard sequence challenge. You may choose whether to
- Take a positive integer \$n\$ and output the \$n\$th highly powerful number (you may choose between 0 and 1 indexing)
- Take a positive integer \$n\$ and output the first \$n\$ highly powerful numbers
- Output all highly powerful numbers indefinitely
This is a code-golf challenge, so the shortest answer in bytes in each language wins.