I think you need to compare the number of Kx+/-1 primes to the average number of primes expected in a particular range of numbers. Primes are very common in numbers smaller than 28 (a third of the numbers from 1 to 27 are prime), so maybe it’s not that surprising that if you pick 8 numbers less than 25, all of a form that ensures that they are not divisible by 2 or 3, that 7 of them are prime. Since 28 and 496 are bigger than 6, you’re naturally going to find fewer primes of the form 28x+/-1 or 496+/-1 (since prime frequently drops off with the size of the number). Looking at numbers of the form 30x+/-1 we have
**
29** 30 ** 31**
**59 ** 60 61 89 90 91

which is almost as good as six - but that’s because 30=235, so I’ve eliminate a lot of possible composites, while still looking at numbers in ranges where primes are pretty common.

It’s fairly obvious that primes must be of the form 6x+1 or 6x-1. The only other possibilities are 6x, 6x+2, 6x+3, and 6x+4. But the first, second and fourth are divisible by 2, and the third is divisible by 3, so none of these cases can be prime. This doesn’t have anything to do with the fact that 6 is perfect, but rather that it is divisible by 2 and 3.

Yes. To elaborate, I meant that the number of primes of the form 6x+1, say enumerated up to some large number, is about the same as the number of primes of the form 6x-1. Same for 4x+1 and 4x-1, etc. I daresay that is not completely obvious.

Off the top of my head, I suspected that abundant numbers might be even better than perfect numbers at having primes within ±1 of them, since they have lots of divisors themselves but are relatively prime to the numbers that are adjacent to them.

So you just want numbers n such that φ(n) is small relative to n? Perfect numbers are ok, but much better to take numbers which are the product of many distinct primes: 2, 6, 30, 210, etc.

ETA as n grows, so inevitably will φ(n), so what is the criterion for success? E.g., all primes are of the form 2n+1, except 2, but φ(30) is 8 already.

There is a rather famous relationship between perfect numbers and prime numbers: There’s a one-to-one correspondence between the even perfect numbers and the Merseinne primes (it’s unknown if there are any odd perfect numbers, but if there are, this doesn’t work for them). If 2^n - 1 is a prime (a Merseinne prime), then 2^(n-1) * (2^n - 1) is a perfect number, and all even perfect numbers are of this form.

For example, 3 is the first Merseinne prime (2^2 - 1). 32^1 = 6, the first perfect number. 7 (which is 2^3 - 1) is the second Merseinne prime, and 28 (which is 72^2) is the second perfect number. 31 is 2^5 - 1, and the third perfect number is 496, which is 31*2^4.

Right; sorry about the abbreviated replies. If n is a perfect number of the form 2[sup]k-1/sup, then φ(n) = 2[sup]k-2/sup, about half of n, so even perfect numbers do no better than powers of 2 if you want φ(n) to be relatively small.