login
Product of all divisors of n, positive or negative.
11

%I #28 Sep 30 2023 19:33:52

%S -1,4,9,-64,25,1296,49,4096,-729,10000,121,2985984,169,38416,50625,

%T -1048576,289,34012224,361,64000000,194481,234256,529,110075314176,

%U -15625,456976,531441,481890304,841,656100000000,961,1073741824,1185921

%N Product of all divisors of n, positive or negative.

%C a(n) is negative iff n is a square.

%H Hugo Pfoertner, <a href="/A217854/b217854.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = (-n)^tau(n) = (-n)^A000005(n).

%F a(n) = A158387(n) * A062758(n). - _Andrew Howroyd_, Aug 31 2023

%t a[n_] := (-n)^DivisorSigma[0, n]; Array[a, 33] (* _Amiram Eldar_, Aug 31 2023 *)

%o (PARI) a(n) = (-n)^numdiv(n); \\ _Michel Marcus_, Aug 31 2023

%Y Cf. A000005, A062758, A158387, A363657, A363658.

%K sign

%O 1,2

%A _Franklin T. Adams-Watters_, Oct 19 2012