Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.9K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Greatest integer solution to a factorial inequality?

Posted 9 years ago

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.

POSTED BY: Eric Hiatt
3 Replies
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
POSTED BY: Frank Kampas

Just for fun, another possibility is to use InverseFunction:

Floor@InverseFunction[Factorial][100]

(* 4 *)
POSTED BY: Carl Woll
Posted 9 years ago

Thank you. I tried something similar to that without luck.

POSTED BY: Eric Hiatt
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard