- #1

- 62

- 0

## Homework Statement

5040 = a!

I found the solution a = 7 through trial and error, was just wondering if a more elegant method exists.

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter SprucerMoose
- Start date

- #1

- 62

- 0

5040 = a!

I found the solution a = 7 through trial and error, was just wondering if a more elegant method exists.

- #2

- 27

- 0

ln(n!)=(n*ln(n)) - n

so you can make a handy table or chart to pluck up the corresponding n values, apart from that doing this is a real mess.

- #3

- 62

- 0

Thanks a lot

- #4

HallsofIvy

Science Advisor

Homework Helper

- 41,833

- 963

5040/2= 2520

2520/3= 840

840/4= 210

210/5= 42

42/6= 7

and

7/7= 1.

- #5

- 1

- 0

- #6

SammyS

Staff Emeritus

Science Advisor

Homework Helper

Gold Member

- 11,363

- 1,031

Do you know the definition of " n! " ?

- #7

HallsofIvy

Science Advisor

Homework Helper

- 41,833

- 963

SammyS's point is that n! is, by definition, divisible by all those numbers.

- #8

Ray Vickson

Science Advisor

Homework Helper

Dearly Missed

- 10,706

- 1,722

ln(n!)=(n*ln(n)) - n

so you can make a handy table or chart to pluck up the corresponding n values, apart from that doing this is a real mess.

Don't forget the constant: n! ~ sqrt(2*pi)*n^(n + 1/2) * exp(-n). If you don't have the sqrt(2*pi) factor the results are inaccurate. Here are the results for log(n!). Column 1 is n, column 2 is log(n!), column 3 is the log of approximation with the sqrt(2pi) factor, and column 4 is the log without the factor:

1 0.0000 -0.0811 -1.0000

2 0.6931 0.6518 -0.2671

3 1.7918 1.7641 0.8451

4 3.1781 3.1573 2.2383

5 4.7875 4.7708 3.8519

6 6.5793 6.5654 5.6464

7 8.5252 8.5133 7.5943

8 10.6046 10.5942 9.6753

9 12.8018 12.7926 11.8736

10 15.1044 15.0961 14.1771

As to how to solve your equation x! = y if you are not sure whether or not there is an integer n giving n! = y: write an equation in the Gamma function, so that x! is defined for all x > 0 (whether integer or not). If you have good software available, your equation can be dealt with using standard techniques such as Newton's method, etc.

RGV

Share: