0
$\begingroup$

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?

$\endgroup$

2 Answers 2

3
$\begingroup$

Here's a fairly straightforward implementation.

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

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

tauPrime[2^3 3^2 5^6 7]
(* 16 *)
$\endgroup$
2
$\begingroup$
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.

$\endgroup$
1
  • $\begingroup$ Many thanks! These work well. $\endgroup$ Commented Dec 17, 2013 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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