OFFSET
0,3
LINKS
FORMULA
PROG
(Python)
from math import gcd
from sympy import nextprime
def A364255(n):
c, p, k = 1, 1, n
while k:
c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
k >>= s+1
return gcd(c*p, n) # Chai Wah Wu, Jul 25 2023
(PARI)
A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 16 2023
STATUS
approved