OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16383
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A054429(n) = ((3<<#binary(n\2))-n-1);
(Python)
from math import gcd
from sympy import nextprime
def A364493(n):
c, p, k = 1, 1, n
while k:
c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
k >>= s+1
return n*c*p//gcd(c*p, n)**2 # Chai Wah Wu, Jul 26 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 26 2023
STATUS
approved