fn prime_tau(n: usize) -> usize {
    // List of prime factors
    euler::prime_factors(n)
        .iter()
        // Get the exponent of each prime in a slightly awkward way
        .fold(HashMap::new(), |mut acc, x| {
            *acc.entry(*x).or_insert(0) += 1;
            acc
        })
        .iter()
        // https://primes.utm.edu/glossary/page.php?sort=Tau
        .fold(1, |acc, x| (acc * (x.1 + 1 as usize)))
}
// Use the prime tau function to compute the number of factors for given N
Use the prime tau function to compute the number of factors for given N
Use the prime tau function to compute the number of factors for given N
fn prime_tau(n: usize) -> usize {
    // List of prime factors
    euler::prime_factors(n)
        .iter()
        // Get the exponent of each prime in a slightly awkward way
        .fold(HashMap::new(), |mut acc, x| {
            *acc.entry(*x).or_insert(0) += 1;
            acc
        })
        .iter()
        // https://primes.utm.edu/glossary/page.php?sort=Tau
        .fold(1, |acc, x| (acc * (x.1 + 1 as usize)))
}
fn prime_tau ( n : usize ) -> usize { // List of prime factors euler :: prime_factors ( n ) . iter ( ) // Get the exponent of each prime in a slightly awkward way . fold ( HashMap :: new ( ) , | mut acc , x | { * acc . entry ( * x ) . or_insert ( 0 ) += 1 ; acc } ) . iter ( ) // https://primes.utm.edu/glossary/page.php?sort=Tau . fold ( 1 , | acc , x | ( acc * ( x . 1 + 1 as usize ) ) ) }
Use the prime tau function to compute the number of factors for given N
Use the prime tau function to compute the number of factors for given N
n
usize
n
usize