OFFSET
1,2
COMMENTS
PROG
(PARI)
A005941(n) = { my(f=factor(n), p, p2=1, res=0); for(i=1, #f~, p = 1 << (primepi(f[i, 1])-1); res += (p * p2 * (2^(f[i, 2])-1)); p2 <<= f[i, 2]); (1+res) }; \\ (After David A. Corneth's program for A156552)
isA364549(n) = ((n%2)&&!(A005941(n)%n));
(Python)
from itertools import count, islice
from sympy import primepi, factorint
def A364549_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue+(startvalue&1^1), 1), 2):
if not (sum(pow(2, i+int(primepi(p))-1, n) for i, p in enumerate(factorint(n, multiple=True)))+1) % n:
yield n
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Antti Karttunen, Jul 28 2023
EXTENSIONS
a(11) from Chai Wah Wu, Jul 28 2023
STATUS
approved