%I #31 Jun 25 2022 21:53:47
%S 0,0,0,2,0,6,0,8,3,10,0,144,0,14,15,64,0,324,0,400,21,22,0,13824,5,26,
%T 27,784,0,27000,0,1024,33,34,35,279936,0,38,39,64000,0,74088,0,1936,
%U 2025,46,0,5308416,7,2500,51,2704,0,157464,55,175616,57,58,0,777600000
%N a(n) = 0 if n is 1 or a prime, otherwise a(n) = product of the proper divisors of n.
%C a(n) = 0 if and only if n is a noncomposite number (cf. A008578). - _Omar E. Pol_, Aug 01 2012
%F a(pq) = pq, p,q = distinct primes. a(p^k) = p^((1/2*k*(k-1)), p = prime, k = integer >=2. a(c) = A007955(c)/c, c = composite number.
%e For n = 15 a(15) = 15 = 3*5.
%t If[#==1||PrimeQ[#],0,Times@@Most[Divisors[#]]]&/@Range[60] (* _Harvey P. Dale_, Jan 24 2014 *)
%o (PARI) a(n) = {if ((n == 1) || isprime(n), return (0)); d = divisors(n); prod(i = 2, #d - 1, d[i]);} \\ _Michel Marcus_, Aug 05 2013
%o (Python)
%o from math import isqrt
%o from sympy import divisor_count
%o def A157195(n): return 0 if (c:=divisor_count(n)) <= 2 else (isqrt(n) if (c:=divisor_count(n)) & 1 else 1)*n**(c//2-1) # _Chai Wah Wu_, Jun 25 2022
%Y Cf. A007955, A008578, A048050.
%K nonn
%O 1,4
%A _Jaroslav Krizek_, Feb 24 2009, Feb 27 2009
%E Edited by _N. J. A. Sloane_, Mar 03 2009
%E Definition clarified by _Harvey P. Dale_, Jan 24 2014