A056038 Largest factorial k! such that (k!)^2 divides n!.
1, 1, 1, 1, 2, 2, 6, 6, 24, 24, 720, 720, 720, 720, 5040, 5040, 40320, 40320, 362880, 362880, 3628800, 3628800, 39916800, 39916800, 479001600, 479001600, 6227020800, 6227020800, 1307674368000, 1307674368000, 1307674368000, 1307674368000, 20922789888000
Offset: 0
Keywords
Examples
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.
Programs
-
Mathematica
a[n_] := Module[{k = 1}, NestWhile[#/(++k)^2 &, n!, IntegerQ]; (k-1)!]; Array[a, 33, 0] (* Amiram Eldar, May 24 2024 *)
Formula
a(n)^2 = A105350(n).
Comments