Tau( n )
Tau
returns the number of the positive divisors (see DivisorsInt) of
the integer n.
Tau
is a multiplicative arithmetic function, i.e., if n and m are
relatively prime we have tau(n m) = tau(n) tau(m). Together with
the formula tau(p^e) = e+1 this allows us to compute tau(n).
Tau
usually spends most of its time factoring n (see FactorsInt).
gap> Tau( 0 ); Error, Tau: <n> must not be 0 gap> Tau( 1 ); 1 gap> Tau( 1013 ); 2 # thus 1013 is a prime gap> Tau( 8128 ); 14 gap> Tau( 36 ); 9 # $\tau(n)$ is odd if and only if $n$ is a perfect square
GAP 3.4.4