A157195 a(n) = 0 if n is 1 or a prime, otherwise a(n) = product of the proper divisors of n.
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, 27, 784, 0, 27000, 0, 1024, 33, 34, 35, 279936, 0, 38, 39, 64000, 0, 74088, 0, 1936, 2025, 46, 0, 5308416, 7, 2500, 51, 2704, 0, 157464, 55, 175616, 57, 58, 0, 777600000
Offset: 1
Keywords
Examples
For n = 15 a(15) = 15 = 3*5.
Programs
-
Mathematica
If[#==1||PrimeQ[#],0,Times@@Most[Divisors[#]]]&/@Range[60] (* Harvey P. Dale, Jan 24 2014 *)
-
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
-
Python
from math import isqrt from sympy import divisor_count 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
Formula
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.
Extensions
Edited by N. J. A. Sloane, Mar 03 2009
Definition clarified by Harvey P. Dale, Jan 24 2014
Comments