|
|
A074198
|
|
Largest k such that 1!*2!*3!*...*k! divides n!.
|
|
2
|
|
|
1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) is asymptotic to sqrt(2*n) and for n > 300 a(n) = ceiling(1/2 + sqrt(1+8*n)/2) (+0 or +1).
|
|
EXAMPLE
|
18!/Product_{i=1..7} i! = 51051 but 18!/Product_{i=1..8} i! = 2431/1920, hence a(18) = 7.
|
|
MATHEMATICA
|
a[n_] := Module[{k = 1}, NestWhile[#/(++k)! &, n!, IntegerQ]; k - 1]; Array[a, 100] (* Amiram Eldar, May 14 2024 *)
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, my(s=1); while(n!%prod(i=1, s, i!) == 0, s++); s-1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|