OFFSET
1,2
LINKS
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
isA355821(n) = A355820(n);
(Python)
from math import prod, gcd
from itertools import count, islice
from sympy import factorint, nextprime
def A355821_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
k = prod(nextprime(p)**e for p, e in factorint(n).items())
m, p, c = 1, 2, n
while c:
c, a = divmod(c, p)
m *= p**a
p = nextprime(p)
if gcd(k, m) == 1:
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 18 2022
STATUS
approved