Besides 2, only even-exponent prime-powers can have the desired property.
Quick start: the sum of divisors of a number with prime factors pi and their exponents αi is

and we want this product to be prime (image from MathWorld). So we can't have more than one prime factor.
Let's say we're looking at the number x·72 with x not divisible by 7. Then the divisors are the divisors of x, and the same divisors each multiplied by 7, and the same divisors multiplied by 49. Their sum is thus 1+7+49 times the sum of the divisors of x. If the latter is larger than 1, that's not prime.
So you can't combine prime factor 7 with any other. And likewise you can't combine any different prime factors. We only need to consider prime powers.
Also, except for 21, the prime power needs to have an even exponent. Otherwise, for example for 35 the sum of divisors is 1+3+9+27+81+243 = (1+3)+(9+27)+(81+243) = 1*4 + 9*4 + 81*4 = (1+9+81)*4. That's some multiplier times (1+thePrime). And even if the multiplier is 1, the (1+thePrime) is only a prime for thePrime=2.
So: Besides 2, the only good numbers are even-exponent prime-powers. And their sum of divisors (sod) is also easy to calculate.
Python code taking half a second to find the 310 numbers that lastchance also found:
from math import isqrt
N = 10**9
def isprime(n):
return all(n%d for d in range(2, isqrt(n)+1))
good = {2}
for i in range(2, isqrt(N)+1):
if isprime(i):
e = 2
while i**e <= N:
sod = (i**(e+1) - 1) // (i - 1)
if isprime(sod):
good.add(i**e)
e += 2
print(len(good))
print(*sorted(good))
Shortened output (Attempt This Online!):
310
2 4 9 16 25 (...) 978250729 982007569 984641641
C++ code, also prints 310:
#include <iostream>
bool isprime(int n) {
for (int d=2; d<=n/d; d++)
if (n%d == 0)
return false;
return true;
}
int main() {
int n = 1'000'000'000;
int good = 1;
for (int i=2; i<=n/i; i++) {
if (isprime(i)) {
for (long long I = i*i; I <= n; I *= i*i) {
long long sod = (I*i-1) / (i-1);
good += isprime(sod);
}
}
}
std::cout << good << '\n';
}
Attempt This Online!