%I #165 Mar 02 2024 15:34:57
%S 1,2,3,8,5,36,7,64,27,100,11,1728,13,196,225,1024,17,5832,19,8000,441,
%T 484,23,331776,125,676,729,21952,29,810000,31,32768,1089,1156,1225,
%U 10077696,37,1444,1521,2560000,41,3111696,43,85184,91125,2116,47,254803968,343
%N Product of divisors of n.
%C All terms of this sequence occur only once. See the second T. D. Noe link for a proof. - _T. D. Noe_, Jul 07 2008
%C Every natural number has a unique representation in terms of divisor products. See the W. Lang link. - _Wolfdieter Lang_, Feb 08 2011
%C a(n) = n only if n is prime or 1 (or, if n is in A008578). - _Alonso del Arte_, Apr 18 2011
%C Sometimes called the "divisorial" of n. - _Daniel Forgues_, Aug 03 2012
%C a(n) divides EulerPhi(x^n-y^n) (see A. Rotkiewicz link). - _Michel Marcus_, Dec 15 2012
%C The proof that all the terms of this sequence occur only once (mentioned above) was given by Niven in 1984. - _Amiram Eldar_, Aug 16 2020
%D József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 1, p. 57.
%D J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 83.
%H Alois P. Heinz, <a href="/A007955/b007955.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H Wolfdieter Lang, <a href="/A007955/a007955.pdf">Divisor Product Representation for Natural Numbers</a>.
%H M. Le, <a href="http://www.gallup.unm.edu/~smarandache/diffle.htm">On Smarandache Divisor Products</a>, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 144-145.
%H F. Luca, <a href="http://www.emis.de/journals/JIPAM/article284.html">On the product of divisors of n and sigma(n)</a>, J. Ineq. Pure Appl. Math. 4 (2) 2003, Article 46.
%H T. D. Noe, <a href="http://www.sspectra.com/math/DivisorProduct.pdf">The Divisor Product is Unique</a>
%H A. Rotkiewicz, <a href="http://dx.doi.org/10.1090/S0002-9939-1961-0125046-8">On the numbers Phi(a^n +/- b^n)</a>, Proc. Amer. Math. Soc. 12 (1961), 419-421.
%H Rodica Simon and Frank W. Schmid, <a href="http://www.jstor.org/stable/2321732">Problem E 2946</a>, The American Mathematical Monthly, Vol. 89, No. 5 (1982), p. 333, Ivan Niven, <a href="https://www.jstor.org/stable/2323376">Product of all Positive Divisors of n, solution to problem E 2946</a>, ibid., Vol. 91, No. 10 (1984), p. 650.
%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DivisorProduct.html">Divisor Product</a>.
%H Zhu Weiyi, <a href="https://vixra.org/abs/1403.0870">On the divisor product sequences</a>, Smarandache Notions J., Vol. 14 (2004), pp. 144-146.
%H OEIS Wiki, <a href="/wiki/Divisorial">Divisorial</a>.
%F a(n) = n^(d(n)/2) = n^(A000005(n)/2). Since a(n) = Product_(d|n) d = Product_(d|n) n/d, we have a(n)*a(n) = Product_(d|n) d*(n/d) = Product_(d|n) n = n^(tau(n)), whence a(n) = n^(tau(n)/2).
%F a(p^k) = p^A000217(k). - _Enrique Pérez Herrero_, Jul 22 2011
%F a(n) = A078599(n) * A178649(n). - _Reinhard Zumkeller_, Feb 06 2012
%F a(n) = A240694(n, A000005(n)). - _Reinhard Zumkeller_, Apr 10 2014
%F From _Antti Karttunen_, Mar 22 2017: (Start)
%F a(n) = A000196(n^A000005(n)). [From the original formula.]
%F A001222(a(n)) = A069264(n). [See _Geoffrey Critzer_'s Feb 03 2015 comment in the latter sequence.]
%F A046523(a(n)) = A283995(n).
%F (End)
%F a(n) = Product_{k=1..n} gcd(n,k)^(1/phi(n/gcd(n,k))) = Product_{k=1..n} (n/gcd(n,k))^(1/phi(n/gcd(n,k))) where phi = A000010. - _Richard L. Ollerton_, Nov 07 2021
%F From _Bernard Schott_, Jan 11 2022: (Start)
%F a(n) = n^2 iff n is in A007422.
%F a(n) = n^3 iff n is in A162947.
%F a(n) = n^4 iff n is in A111398.
%F a(n) = n^5 iff n is in A030628.
%F a(n) = n^(3/2) iff n is in A280076. (End)
%F From _Amiram Eldar_, Oct 29 2022: (Start)
%F a(n) = n * A007956(n).
%F Sum_{k=1..n} 1/a(k) ~ log(log(n)) + c + O(1/log(n)), where c is a constant (Weiyi, 2004; Sandor and Crstici, 2004). (End)
%F a(n) = Product_{k=1..n} (n * (1 - ceiling(n/k - floor(n/k))))/k + ceiling(n/k - floor(n/k)). - _Adriano Steffler_, Feb 08 2024
%e Divisors of 10 = [1, 2, 5, 10]. So, a(10) = 2*5*10 = 100. - _Indranil Ghosh_, Mar 22 2017
%p A007955 := proc(n) mul(d,d=numtheory[divisors](n)) ; end proc: # _R. J. Mathar_, Mar 17 2011
%p seq(isqrt(n^numtheory[tau](n)), n=1..50); # _Gary Detlefs_, Feb 15 2019
%t Array [ Times @@ Divisors[ # ]&, 100 ]
%t a[n_] := n^(DivisorSigma[0, n]/2); Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Nov 21 2013 *)
%o (Magma) f := function(n); t1 := &*[d : d in Divisors(n) ]; return t1; end function;
%o (PARI) a(n)=if(issquare(n,&n),n^numdiv(n^2),n^(numdiv(n)/2)) \\ _Charles R Greathouse IV_, Feb 11 2011
%o (Haskell)
%o a007955 = product . a027750_row -- _Reinhard Zumkeller_, Feb 06 2012
%o (Sage) [prod(divisors(n)) for n in (1..100)] # _Giuseppe Coppoletta_, Dec 16 2014
%o (Scheme)
%o ;; A naive stand-alone implementation:
%o (define (A007955 n) (let loop ((d n) (m 1)) (cond ((zero? d) m) ((zero? (modulo n d)) (loop (- d 1) (* m d))) (else (loop (- d 1) m)))))
%o ;; Faster, if A000005 and A000196 are available:
%o (define (A007955 n) (A000196 (expt n (A000005 n))))
%o ;; _Antti Karttunen_, Mar 22 2017
%o (Python)
%o from sympy import prod, divisors
%o print([prod(divisors(n)) for n in range(1, 51)]) # _Indranil Ghosh_, Mar 22 2017
%o (Python)
%o from math import isqrt
%o from sympy import divisor_count
%o def A007955(n):
%o d = divisor_count(n)
%o return isqrt(n)**d if d % 2 else n**(d//2) # _Chai Wah Wu_, Jan 05 2022
%o (GAP) List(List([1..50],n->DivisorsInt(n)),Product); # _Muniru A Asiru_, Feb 17 2019
%Y Cf. A000005, A000196, A001222, A007422, A007956, A027750, A030628, A046523, A069264, A072046, A111398, A162947, A224381, A243103, A280076, A283995.
%Y Cf. A000203 (sums of divisors).
%Y Cf. A000010 (comments on product formulas).
%K nonn,nice
%O 1,2
%A R. Muller