# Factorial problem

What do you think is the value of
100!-101!+102!-103!.........-109!+110!

QuantumQuest
Gold Member
n! = (n-1)!n. Take 100! as a common factor and go from there...

Come on man!!! i tried ... doesn't work....

Mark44
Mentor
Come on man!!! i tried ... doesn't work....
Show us that you tried...

when you take out 100! common out......then you are left with (1-101+102 times 101...........) which afterwards........don't know man......addition is not the way out as it gives you a very humongous number....

SteamKing
Staff Emeritus
Homework Helper
What do you think is the value of
100!-101!+102!-103!.........-109!+110!
It's going to be pretty large.

Write the sum this way:

S = 110! - 109! + 108! - 107! + 106! - 105! + 104! - 103! + 102! - 101! + 100!

which can be grouped:

S = (110! - 109!) + (108! - 107!) + ... + (102! - 101!) + 100!

Now, take the term (110! - 109!) = (110 * 109! - 109!) = (110 - 1) * 109! = 109 * 109!

You can telescope the other terms in this sum in a similar fashion.

S = 109 * 109! + 107 * 107! + 105 * 105! + 103 * 103! + 101 * 101! + 100!

You can manipulate the terms in the sum above in a similar manner, but the result is clear:

S is a pretty big number no matter how you slice it.

Were you thinking that S would not be such a large number?

Does it help any if you take out 110! as a factor?

fresh_42
Mentor
Are all 179 digits required?

17038855571963704692695290461249778228462303133623533009426911791940783815733361939707507950770908256181833575228292258746464777211982419630317448315535360000000000000000000000000

pbuk
fresh_42
Mentor
17038855571963704692695290461249778228462303133623533009426911791940783815733361939707507950770908256181833575228292258746464777211982419630317448315535360000000000000000000000000
Wow! And I was tempted to answer simply O(1). However, Stirling gave me 1.58...for 110! Would be interesting to know whether the calc.exe isn't precise enough or the margin in Stirling's formula is larger than I thought.

Wow! And I was tempted to answer simply O(1). However, Stirling gave me 1.58...for 110! Would be interesting to know whether the calc.exe isn't precise enough or the margin in Stirling's formula is larger than I thought.
According to the program I just wrote:
110!=15882455415227429404253703127090772871724410234473563207581748318444567162948183030959960131517678520479243672638179990208521148623422266876757623911219200000000000000000000000000
So Stirling definitely is accurate here.

SteamKing
Staff Emeritus
Homework Helper
17038855571963704692695290461249778228462303133623533009426911791940783815733361939707507950770908256181833575228292258746464777211982419630317448315535360000000000000000000000000
Not sure what this number is.

DrClaude
Mentor
Using Mathematica:
In[2]:= 110! - 109! + 108! - 107! + 106! - 105! + 104! - 103! + 102! - 101! + 100!

Out[2]= 15739381947081460468710896569033260448048487750802968746988405111340773775128510600810783940010370922688077274739713895911222137779156961431310006359162880000000000000000000000000
You can do it yourself using WolframAlpha.