OFFSET
1,1
EXAMPLE
4 is a term since the strict divisors of 4 are {1, 2}, 1^1 + 2^1 = 3 and 1^2 + 2^2 = 5 are prime and no number < 4 has this property.
PROG
(PARI)
card(n)=my(c=1, s=0); s=sigma(n)-n; while(isprime(s), c++; s=sigma(n, c)-n^c); c--
a(n)=my(x=0); for(k=1, +oo, x=card(k); if(x>=n, return(k)))
(Python)
from itertools import count
from math import prod
from sympy import isprime, factorint
def A358199(n):
for m in count(2):
f = factorint(m).items()
if all(map(isprime, (prod((p**((e+1)*i)-1)//(p**i-1) for p, e in f) - m**i for i in range(1, n+1)))):
return m # Chai Wah Wu, Nov 15 2022
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jean-Marc Rebert, Nov 02 2022
STATUS
approved