*(I've posted this question earlier to MSE but did not receive answers, so I'll try it here. I also condensed the wording, hopefully not too much)*

Let

$\displaystyle \small \qquad f_w = (2-1)(3-1)(5-1)\ldots(p_w-1) \qquad = \prod_{k=1}^w (prime(k)-1) $

or in general with a natural number for the exponent *n*

$\displaystyle \small (1) \qquad f_w(n) = (2^n-1)(3^n-1)(5^n-1)\ldots(p_w^n-1) \qquad = \prod_{k=1}^w (prime(k)^n-1) $

with *w* going to infinity.

Then let's denote the canonical primefactorization of that product

$\displaystyle \small (2) \qquad f_w(n) = 2^{a_{n,1}} \cdot 3^{a_{n,2}} \cdot 5^{a_{n,3}} \cdot \ldots \cdot q_k^{a_{n,k}} \cdot \ldots $

using *q* for the primefactors here to avoid confusion between the two representations.

I am interested, whether there is an analytical expression for the relative frequencies

$\small (3) \qquad r_w(n,k) = a_{n,k} / w $

in the limit in the latter expression.

Empirically (using the first *600000* primes in formula (1)) I found approximations to rational values for the relative frequencies of the first few primefactors *q* in formula (2) giving a somehow meaningful table, where, after scaling near to integers, for small primes *q* the error was in the near of *1/1000* . However, I cannot determine, whether the deviations from my estimated analytical formula are random and are vanishing in the limit or whether they keep a bias. Especially the primefactor *q=2* in the formula (2) seems to have a nonrandom bias which might survive in the limit.

Here is the table. The entries $\small e_{n,q}$ give the rounded empirical frequencies $\small e_{n,q} \approx a_{n,k}/w \cdot (q-1)^2 $

$\small \qquad \begin{array} {r|rrrrrrrrrrrr} n&2&3&5&7&11&13&17&19&23& (\ldots \text{ primefactor }q)\\ \hline \\ 1&2&3&5&7&11&13&17&19&23 \\ 2&4&6&10&14&22&26&34&38&46 \\ 3&2&5&5&21&11&39&17&57&23 \\ 4&5&6&20&14&22&52&68&38&46 \\ 5&2&3&9&7&55&13&17&19&23 \\ 6&4&10&10&42&22&78&34&114&46 \\ 7&2&3&5&13&11&13&17&19&23 \\ 8&6&6&20&14&22&52&136&38&46 \\ 9&2&7&5&21&11&39&17&171&23 \\ 10&4&6&18&14&110&26&34&38&46 \\ 11&2&3&5&7&21&13&17&19&253 \\ 12&5&10&20&42&22&156&68&114&46 \\ 13&2&3&5&7&11&25&17&19&23 \\ 14&4&6&10&26&22&26&34&38&46 \\ 15&2&5&9&21&55&39&17&57&23 \\ 16&7&6&20&14&22&52&272&38&46 \\ 17&2&3&5&7&11&13&33&19&23 \\ 18&4&14&10&42&22&78&34&342&46 \end{array} $

The heuristical formula that I extrapolated (letting *w* increase towards infinity) has two forms:

if *q=2* and *n* is even (*gcd(n,q)=2*):

$\small \qquad e_{n,2} = (3 + \operatorname{val}( n,2 ) ) $

where the function *val(n,q)* means: the exponent, to which primefactor *q* occurs in *n*

For all other cases

$\small \qquad e_{n,q} = \gcd(n,q-1) \cdot (q + (q-1)\cdot \operatorname{val}(n,q) ) $

Then

$\small \qquad \displaystyle a_{n,q} = { e_{n,q} \cdot w \over (q-1)^2 } $

Can the guessed formula be confirmed by an analytical argument?