login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A358199
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.
1
4, 4, 981, 8829, 8829, 122029105, 2282761881
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
Subsequence of A037020.
Sequence in context: A068556 A078243 A024246 * A024247 A067445 A167003
KEYWORD
nonn,more
AUTHOR
Jean-Marc Rebert, Nov 02 2022
STATUS
approved