login
Largest factorial k! such that (k!)^2 divides n!.
5

%I #21 May 25 2024 19:40:28

%S 1,1,1,1,2,2,6,6,24,24,720,720,720,720,5040,5040,40320,40320,362880,

%T 362880,3628800,3628800,39916800,39916800,479001600,479001600,

%U 6227020800,6227020800,1307674368000,1307674368000,1307674368000,1307674368000,20922789888000

%N Largest factorial k! such that (k!)^2 divides n!.

%C This is neither floor(n/2)! nor ceiling(n/2)!, but often coincides with one of them.

%C a(n) = k!, where k = floor(n/2) + d(n) and d = 0, 1, 2, ... . Below 1000, d = 1 arises 93 times, and d = 2 arises 4 times. See A056067 and A056068.

%F a(n)^2 = A105350(n).

%e For n = 10 or n = 11, floor(n/2)! = 5! = 120; 5!^2 = 14400 divides 10! = 14400*252 or 11! = 14400*2772. However, 10!/6!^2 = 7 and 11!/6!^2 = 77, i.e., (d + floor(n/2))^2 may divide n!. Here d = 1, but d > 1 also occurs as follows: for n = 416 or n = 417, floor(n/2) = 208, and 208!^2 divides 416! and 417!, but 209!^2 and 210!^2 also divide these factorials.

%t a[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; (k-1)!]; Array[a, 33, 0] (* _Amiram Eldar_, May 24 2024 *)

%Y Cf. A000142, A001057, A001405, A055772, A056039, A056067, A056068, A105350.

%K nonn

%O 0,5

%A _Labos Elemer_, Jul 25 2000