Your argument generalizes: If n = 2^k - 1 is prime, then d(n)=2, d(n+1)=k+1. If d(m)=2 and d(m+1)=k+1, then m is prime and m+1 is a k-th prime power; if k>1, m must be odd, hence m+1=2^k. Thus A161460 contains at least all Mersenne primes Hagen