Theorem: Integers with Prime Values of Divisor Sum

The sequence of integers whose divisor sum is prime begins:
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} 2
      | r = 3
}}
{{eqn | l = \map {\sigma_1} 4
      | r = 7
}}
{{eqn | l = \map {\sigma_1} 6
      | r = 13
}}
{{eqn | l = \map {\sigma_1} {16}
      | r = 31
}}
{{eqn | l = \map {\sigma_1} {25}
      | r = 31
}}
{{eqn | l = \map {\sigma_1} {64}
      | r = 127
}}
{{eqn | l = \map {\sigma_1} {289}
      | r = 307
}}
{{end-eqn}}
{{OEIS|A023194}}

Proof:
Apart from $2$, all primes are odd.
From Divisor Sum is Odd iff Argument is Square or Twice Square, for $\map {\sigma_1} n$ to be odd it needs to be of the form $m^2$ or $2 m^2$.
Suppose $n$ has two coprime divisors $p$ and $q$, each to power $k_p$ and $k_q$ respectively.
Then $\map {\sigma_1} n$ will have $\map {\sigma_1} {p^{k_p} }$ and $\map {\sigma_1} {q^{k_q} }$ as divisors.
Hence $\map {\sigma_1} n$ will not be prime.
So for $\map {\sigma_1} n$ to be prime, $n$ can have only one prime factor.
This gives possible values for $n$ as:
:powers of $2$, either odd or even
or:
:even powers of a prime number.
These can be investigated in turn, using Divisor Sum of Power of Prime:
:$\map {\sigma_1} {p^k} = \dfrac {p^{k + 1} - 1} {p - 1}$
Note that as $\map {\sigma_1} {2^k} = \dfrac {2^{k + 1} - 1} {2 - 1} = 2^{k + 1} - 1$ it is necessary for powers of $2$ merely to report the appropriate Mersenne prime.
Hence when $k + 1$ is not prime, $\map {\sigma_1} {2^k}$ will not be prime and there is no need to test it.
Thus we test all $n$ such that:
:$n = p^{2 k}$ for prime $p$
:$n = 2^k$ where $k + 1$ is prime
and so:
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} 2
      | r = 2^2 - 1
      | c = 
}}
{{eqn | r = 3
      | c = which is a Mersenne prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} 4
      | r = \map {\sigma_1} {2^2}
}}
{{eqn | r = 2^3 - 1
}}
{{eqn | r = 7
      | c = which is a Mersenne prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} 9
      | r = \map {\sigma_1} {3^2}
}}
{{eqn | r = \dfrac {3^3 - 1} {3 - 1}
}}
{{eqn | r = \dfrac {26} 2
}}
{{eqn | r = 13
      | c = which is prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {16}
      | r = \map {\sigma_1} {2^4}
}}
{{eqn | r = \dfrac {2^5 - 1} {2 - 1}
}}
{{eqn | r = 31
      | c = which is prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {25}
      | r = \map {\sigma_1} {5^2}
}}
{{eqn | r = \dfrac {5^3 - 1} {5 - 1}
}}
{{eqn | r = \dfrac {124} 4
}}
{{eqn | r = 31
      | c = which is prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {49}
      | r = \map {\sigma_1} {7^2}
}}
{{eqn | r = \dfrac {7^3 - 1} {7 - 1}
}}
{{eqn | r = \dfrac {342} 6
}}
{{eqn | r = 57 = 3 \times 19
      | c = which is not prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {64}
      | r = \map {\sigma_1} {2^6}
}}
{{eqn | r = \dfrac {2^7 - 1} {2 - 1}
}}
{{eqn | r = 127
      | c = which is a Mersenne prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {121}
      | r = \map {\sigma_1} {11^2}
}}
{{eqn | r = \dfrac {11^3 - 1} {11 - 1}
}}
{{eqn | r = \dfrac {1330} {10}
}}
{{eqn | r = 133 = 7 \times 19
      | c = which is not prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {169}
      | r = \map {\sigma_1} {13^2}
}}
{{eqn | r = \dfrac {13^3 - 1} {11 - 1}
}}
{{eqn | r = \dfrac {2196} {12}
}}
{{eqn | r = 183 = 3 \times 61
      | c = which is not prime
}}
{{end-eqn}}
{{begin-eqn}}
{{eqn | l = \map {\sigma_1} {289}
      | r = \map {\sigma_1} {17^2}
}}
{{eqn | r = \dfrac {17^3 - 1} {17 - 1}
}}
{{eqn | r = \dfrac {4912} {16}
}}
{{eqn | r = 307
      | c = which is prime
}}
{{end-eqn}}
Hence the sequence as given.
{{qed}}