Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #30 Nov 16 2022 06:58:01
%S 4,4,981,8829,8829,122029105,2282761881
%N a(n) is the least integer whose sum of the i-th powers of the proper divisors is a prime for 1 <= i <= n, or -1 if no such number exists.
%e 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.
%o (PARI)
%o card(n)=my(c=1,s=0);s=sigma(n)-n;while(isprime(s),c++;s=sigma(n,c)-n^c);c--
%o a(n)=my(x=0);for(k=1,+oo,x=card(k);if(x>=n,return(k)))
%o (Python)
%o from itertools import count
%o from math import prod
%o from sympy import isprime, factorint
%o def A358199(n):
%o for m in count(2):
%o f = factorint(m).items()
%o 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)))):
%o return m # _Chai Wah Wu_, Nov 15 2022
%Y Cf. A001065 (s1), A180852, A357324, A057709, A000203, A001157, A001158.
%Y Subsequence of A037020.
%K nonn,more
%O 1,1
%A _Jean-Marc Rebert_, Nov 02 2022