My Math Forum Factorial equations

 Algebra Pre-Algebra and Basic Algebra Math Forum

 April 1st, 2018, 07:01 AM #1 Senior Member   Joined: Dec 2015 From: somewhere Posts: 551 Thanks: 83 Factorial equations How to solve without inspection , for $\displaystyle n$ -natural 1) $\displaystyle n!=1$ 2) $\displaystyle n!=2$ 3) $\displaystyle n!=6$
 April 1st, 2018, 08:16 AM #2 Senior Member   Joined: May 2016 From: USA Posts: 1,310 Thanks: 551 I have no idea what this question even means. Are you asking whether there is a mystical process whereby you can evaluate 23! without computation? One way to define the factorial operation on non-negative integers is $n \in \mathbb Z_{\ge 0} \implies$ $n! = 1 \text { if } n = 0 \text { and }$ $n! = n * (n - 1)! \text { if } n > 0.$ But to determine what number is equal to 23!, what kind of process are you looking for that does not involve any arithmetic?
April 1st, 2018, 11:06 AM   #3
Senior Member

Joined: Sep 2016
From: USA

Posts: 635
Thanks: 401

Math Focus: Dynamical systems, analytic function theory, numerics
Quote:
 Originally Posted by idontknow How to solve without inspection , for $\displaystyle n$ -natural 1) $\displaystyle n!=1$ 2) $\displaystyle n!=2$ 3) $\displaystyle n!=6$
What does "without inspection" mean? You could evaluate
$n! = \int_0^\infty x^ne^{-x} \ dx$
but I am not sure how that would be easier nor whether it would avoid inspection whatever that means. I can't imagine an easier computation than multiplying $n$ numbers together.

April 1st, 2018, 11:35 AM   #4
Math Team

Joined: May 2013
From: The Astral plane

Posts: 2,226
Thanks: 908

Math Focus: Wibbly wobbly timey-wimey stuff.
Quote:
 Originally Posted by SDK What does "without inspection" mean? You could evaluate $n! = \int_0^\infty x^ne^{-x} \ dx$ but I am not sure how that would be easier nor whether it would avoid inspection whatever that means. I can't imagine an easier computation than multiplying $n$ numbers together.
I think the OP wants the reverse... given x, solve n! = x for n.

-Dan

 April 1st, 2018, 12:29 PM #5 Global Moderator   Joined: May 2007 Posts: 6,787 Thanks: 708 For small n, brute force is simplest. For large n, use Stirling's formula and invert (may not be easy).
April 1st, 2018, 02:03 PM   #6
Senior Member

Joined: May 2016
From: USA

Posts: 1,310
Thanks: 551

Quote:
 Originally Posted by topsquark I think the OP wants the reverse... given x, solve n! = x for n. -Dan
Well if that is what is being asked, it sure was asked obscurely.

If we are discussing positive integers, a fairly efficient algorithm is available. To determine whether any positive integer less than 200 trillion is a factorial of an integer, a binary search against a table of the factorials of 1 through 16 will require at most 4 comparisons. The brute force involved is that of a mouse.

April 1st, 2018, 03:35 PM   #7
Senior Member

Joined: Sep 2016
From: USA

Posts: 635
Thanks: 401

Math Focus: Dynamical systems, analytic function theory, numerics
Quote:
 Originally Posted by JeffM1 Well if that is what is being asked, it sure was asked obscurely. If we are discussing positive integers, a fairly efficient algorithm is available. To determine whether any positive integer less than 200 trillion is a factorial of an integer, a binary search against a table of the factorials of 1 through 16 will require at most 4 comparisons. The brute force involved is that of a mouse.
I'll agree that this was certainly not clear to me either. If this is the case, its fairly simple to get rough bounds which will make the computation fast. I'm sure someone has already thought about this and done a better job via Stirling's approximation, but a quick computation gives the following:

Notice that $\log n! = \sum_{k = 1}^n \log k$ leading to a simple integral bound
$\int_2^n \log x \ dx \leq \log n! \leq \int_1^n \log x \ dx.$
Solving these integrals we get the bound
$(n-1) \log (n-1) + 1 \leq \log n! \leq n \log n.$

Now, given an integer $m$, solve $(x-1) \log (x-1) = \log m - 1$ for $x_L$, and solve $x \log x = \log m$ for $x_R$, then if $m = n!$ for some $n$, it must be that $n \in [\exp(x_L), \exp(x_R)]$ which is easy to check. In fact, one can get an even faster computation by checking that $m$ is divisible by $\lceil x_L \rceil$ and if so, dividing it out and iterating.

 Tags equations, factorial

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post ducnhuandoan Number Theory 13 June 14th, 2016 12:20 AM deadweight Elementary Math 4 June 6th, 2015 01:38 AM bilano99 Calculus 2 May 1st, 2012 10:12 AM panky Algebra 1 November 29th, 2011 12:31 AM rafky Algebra 4 December 3rd, 2009 12:06 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top