I'm trying to find the greatest integer solution to a factorial inequality such as:
x! <= 100 x = 4
But I've had surprising difficulty finding the functions to do this. I can get a list of every integer solution, but not select the greatest one from the generated list using the commands I found.
In[2]:= res = Solve[x! <= 100, x, Integers] Out[2]= {{x -> 0}, {x -> 1}, {x -> 2}, {x -> 3}, {x -> 4}} In[3]:= Max[x /. res] Out[3]= 4
Just for fun, another possibility is to use InverseFunction:
InverseFunction
Floor@InverseFunction[Factorial][100] (* 4 *)
Thank you. I tried something similar to that without luck.