Sum of all positive divisors are prime

1k Views Asked by At

For an integer $n$, let $\sigma (n)$ be the sum of all the positive divisors of $n$. For how many integers $n$ in the inclusive range $[1, 500]$ will $\sigma (n)$ be a prime number?

I tried doing casework to limit the ones I have to check.

Case 1: if $n$ is prime $p$, then $f(n) = p+1$, thus all of the primes will not be counted except for $n = 2$

Case 2: if $n = p_1 * p_2 ... p_x$ then $f(n) = (p_1 + 1) (p_2 + 1) ... (p_x + 1)$ thus all composite numbers will not be counted if it has at least 2 divisors

Case 3: if $n = p^2$ then $f(n) = p^2 + p+ 1$ which can be considered.

Case 4: if $n = p^{2m-1}$ then $f(n) = p^{2m-1} ... + 1 = \frac{(p^m -1)(p^m+1)}{p-1}$ which is always composite.

Do i Have to just trial and error for case 3? Is there another way to solve this problem? Is my solution above reasonable?

1

There are 1 best solutions below

0
On BEST ANSWER

$\sigma(n)$ is multiplicative, meaning if $m$ and $n$ are relatively prime, $\sigma(mn) = \sigma(m)\sigma(n)$. This means you only need to consider the case of $n = p^k$ where $p$ is prime and $k \geq 1$. If $k = 1$, then obviously $p = n = 2$. So you can assume $k > 1$.

It's easy to see that $\sigma(n) = \frac{p^{k+1} - 1}{p - 1}$ Observe that if $d | k + 1$, then $p^d - 1 | p^{k + 1} - 1$. So if you want $\sigma(n)$ to be prime, you need $k + 1$ to be prime.

Restrict to $n = p^{q - 1}$, where $p$ and $q$ are odd primes, and you will have a pretty short list of numbers to check. You could write a short program to do it for you.