login
The least odd number with the same prime signature as n.
2

%I #15 Jan 12 2023 16:26:30

%S 1,3,3,9,3,15,3,27,9,15,3,45,3,15,15,81,3,45,3,45,15,15,3,135,9,15,27,

%T 45,3,105,3,243,15,15,15,225,3,15,15,135,3,105,3,45,45,15,3,405,9,45,

%U 15,45,3,135,15,135,15,15,3,315,3,15,45,729,15,105,3,45,15,105,3,675,3,15,45,45,15,105,3,405,81

%N The least odd number with the same prime signature as n.

%F a(n) = A003961(A046523(n)).

%p a:= n-> (l-> mul(ithprime(i+1)^l[i][2], i=1..nops(l)))

%p (sort(ifactors(n)[2], (x, y)->x[2]>y[2])):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jan 12 2023

%o (PARI) a(n) = { my(f=vecsort(factor(n)[, 2], , 4)); prod(i=1, #f, prime(i+1)^f[i]) } \\ _Andrew Howroyd_, Jan 12 2023

%o (Python)

%o from math import prod

%o from sympy import prime, factorint

%o def A359600(n): return prod(prime(i)**e for i, e in enumerate(sorted(factorint(n).values(), reverse=True),2)) # _Chai Wah Wu_, Jan 12 2023

%Y Cf. A003961, A046523, A101296.

%Y Cf. also A278223.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 12 2023