login
Product of all n - d, where 1 < d < n and d is a divisor of n.
2

%I #17 Dec 30 2024 17:03:54

%S 1,1,1,2,1,12,1,24,6,40,1,4320,1,84,120,1344,1,25920,1,43200,252,220,

%T 1,31933440,20,312,432,183456,1,136080000,1,322560,660,544,840,

%U 12563527680,1,684,936,919296000,1,1155772800,1,1219680,1814400,1012,1

%N Product of all n - d, where 1 < d < n and d is a divisor of n.

%C For prime p, a(p) = 1.

%C If n is not a prime or the square of a prime then n divides a(n).

%H Robert Israel, <a href="/A072512/b072512.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 16 the nontrivial divisors d are 2,4 and 8, so a(16) = (16-2)*(16-4)*(16-8) = 14*12*8 = 1344.

%p f:= proc(n) local d; mul(n-d, d = numtheory:-divisors(n) minus {1,n}) end proc:

%p map(f, [$1..50]); # _Robert Israel_, Dec 30 2024

%o (PARI) a(n) = my(d=divisors(n)); prod(j=2, matsize(d)[2]-1, n-d[j]);

%Y Cf. A072513.

%K nonn,look

%O 1,4

%A _Amarnath Murthy_, Jul 28 2002

%E Edited and extended by _Klaus Brockhaus_, Jul 31 2002