Count the divisors of n with particular property Take $n = \prod_{i=1}^r {p_i}^{\alpha_i}$, where each $p_i$ is a prime and $\alpha_i\geq 1$.
How many divisors of $n$, not equal to $n$, contain at least one $p_i$ with the corresponding multiplicity $\alpha_i$?
 A: I'm not sure if your posted answer is correct, but here's one way to think about the problem. How many divisors are there where no prime occurs with maximal multiplicity? This is easy to compute as $\prod_m \alpha_m$ since you can choose exponents between $0$ and $\alpha_m-1$ for each prime divisor, each giving rise to a unique product for each choice. Then how many total divisors are there? This is $\prod_m (\alpha_m + 1)$. The difference between these two quantities is the answer you want, and subtract $1$ if you want to exclude $n$ as a divisor of itself.
A: Let $\operatorname{rad}(n)=\prod_{i=1}^rp_i$ be the largest squarefree number dividing n. Then the answer is $d(n)-d(\operatorname{rad}(n)).$
Edit: You didn't want to include n, so subtract 1 unless n is squarefree.
A: My answer is
$$
\sum_{k=2}^r \binom{r}{k} \left( 1 + \sum_{l=1}^{k-1} \prod_m(\alpha_m-1)^{\binom{k-1}{l}} \right) + r - 1
$$
where 


*

*$1$ corresponds to all divisors that combine only (at least 2) primes with multiplicity, 

*$r-1 = \binom{r}{1} - \binom{r}{r}$ corresponds to each single ${p_i}^{\alpha_i}$ not included previously minus the term that corresponds to $n$, 

*$l$ corresponds to the number of primes with multiplicity in a number that contains $k$ primes, and $\binom{k-1}{l}$ stands for how many times each prime would then not appear with multiplicity.


Is this correct?
A: If $ \ n=(p_1)^{a_1} \ \times \ldots \times (p_r)^{a_r} \ $
then the required answer is
$$ (a_1+1)(a_2+1)\ldots(a_{(r-1)}+1) \ + \ (a_1+1)(a_2+1)\ldots (a_{(r-2)}+1)(a_r+1) \ + \ \ldots \ +(a_1+1)(a_3+1)\ldots (a_{(r-2)}+1)(a_{(r-1)}+1)(a_r+1) \ + \ (a_2+1)(a_3+1)\ldots(a_{(r-2)}+1)(a_{(r-1)}+1)(a_r+1) \ - \ r \ ; $$ 
the sum contains $ \ r \ $ summands.
Example for $n=24=2^3\cdot3$, the numbers are $2^3 \ , \ 2\cdot3 \ , \ 2^2\cdot3 \ , \ 3$ . According to the formula the number of such numbers is $ \ (3+1)+(1+1)-2 \ =  \ 4 \ $ .
