The sum of divisors function is given by
$$\sigma(n)=\prod_{i=1}^r\frac{p_i^{a_i+1}-1}{p_i-1}=\prod_{i=1}^r(1+p_i+p_i^2+\cdots+{p_i}^{a_i})$$ with $$n=\prod_{i=1}^r{p_i}^{a_i}$$
I call each term in the sigma product formula a factor $f(p_i, a_i)$. For $p$ to divide $\sigma(n)$, it must divide at least one of the factors. The rest of the factors can then be any values.
My questions:
- When will $f(p_m, a_m)=f(p_n, a_n)$? I did a small test with $p<100,a\le10$ and found $f(5,2) = f(2,4) = 31$.
- I believe finding all $n$ such that $p|\sigma(n)$ can be achieved by finding $p|f(p_i,a_i)$ and using all multiples $k \cdot f(p_i,a_i)$ with $p_i \nmid k$. I'm worried that I might get duplicate multiples of $k_m \cdot f(p_m,a_m) = k_n \cdot f(p_n,a_n)$, as with the immediate case $2f(3,1)=f(7,1)=8$. Can I find all $n$ using my method without duplicates?
I am not sure if this would help. It seems that you want to find $n$ satisfying $p|\sigma(n)$ for some prime $p$. The following is easy to see from the factorization of $\sigma(n)$: $$ p|\sigma(n) \ \Longleftrightarrow p|\frac{q^{e+1}-1}{q-1} $$ for at least one prime divisor $q|n$ with $q^e||n$.
There are two cases that this can happen:
Case 1: $p|q-1$
If $p|q-1$ then $\frac{q^{e+1}-1}{q-1} \equiv e+1 \ \mathrm{mod} \ p$. Then it follows that $p|e+1$.
Case 2: $p\nmid q-1$
If $p\nmid q-1$ then $p|q^{e+1}-1$. This means that $\mathrm{ord}_p(q) |e+1$.