# Code for sum of exponential divisors function

Consider $n = p_{1}^{a_1}\cdots p_{r}^{a_{r}}$. An integer $d = p_{i}^{b_{i}} \cdots p_{r}^{b^{r}}$ is called an exponential divisor of $n$ if $b_{i}$ divides $a_{i}$ for every $1\leq i \leq r.$

I am trying to encode two functions: $\tau'(n)$, the number of exponential divisors of $n$, and $\sigma'(n)$, the sum of the exponential divisors of $n$.

Both $\tau'$ and $\sigma'$ are multiplicative, hence we only need to look at them on prime powers. For example

$\sigma'(p^6) = p + p^2 + p^3 + p^6$,

and

$\tau'(p^6) = 4$.

I have been having difficulty in using Mathematica to encode an expression for $\tau'$ and $\sigma'$. I do not really understand what 'heads' and 'levels' mean. Does anyone have any suggestions?

Here's a fairly straightforward implementation.

sigmaPrime[n_] := Apply[Times, Total[#[]^Divisors[#[]]] & /@ FactorInteger[n]]
tauPrime[n_] := Apply[Times, DivisorSigma[0, #[]] & /@ FactorInteger[n]]

sigmaPrime[2^3 3^2 5^6 7]
(* 13255200 *)

tauPrime[2^3 3^2 5^6 7]
(* 16 *)

sig[n_] :=
Times @@ MapThread[Total[#1^Divisors[#2]] &,
Transpose[FactorInteger[n]]]
tau[n_] :=
Times @@ MapThread[Length[Divisors[#2]] &,
Transpose[FactorInteger[n]]]


These are really trivial variants of MichaelE2 (now that I have read his answer).

Testing (unsuprisingly):

sig[2^3 3^2 5^6 7]


yields:

(* 13255200 *)

and

tau[2^3 3^2 5^6 7]


yields 16.

• Many thanks! These work well. Dec 17, 2013 at 0:15