How the Mathematical Ninja estimates factorials

"I suppose," said the Mathematical Ninja, "I can allow you to put $20!$ into a calculator. There's absolutely no reason you should know that it turns out to be about $2.4 \times 10^{18}$."

The student tapped the numbers in, frowned, thought for a moment and said "OK, I'll bite. How...?"

"Simply Stirling's approximation!" said the Mathematical Ninja, looking for all the world like someone who had left their favourite weapon of mass destruction outside in the car park1

"Stirling's approximation?"

"Stirling's approximation," confirmed the Mathematical Ninja, patiently. " $n! \approx \sqrt{2\pi n} \left(\frac n e\right)^n$."

Eyes left. Eyes right. "I have to confess," confessed the student, "I don't see how that makes it much easier."

A big sigh. A glance towards the car park. If the Mathematical Ninja had been allowed to stand in the Labour leadership election, there would have been no questions about pressing the button2. "Well, 20 is a tiny bit -- about 0.4% -- more than $e^3$, so the bracket is $\left(e^2\right)^{20}$, or $e^{40}$. In fact, I adjusted that, too -- $0.4% \times 20$ is 8%, which I'll need to add on at the end."

Shrug. "I can sort of see that."

"$2\pi (20)$ is $40π$, of course, which is about $\frac{880}{7}$, or roughly 126. The square root of that is a smidge more than 11."

"Now you're just showing off."

The Mathematical Ninja continued, looking around for the car keys. "To turn $e^n$ into powers of ten, you divide $n$ by 2.3, and $\frac{40}{2.3} = \frac{160}{9.2} \approx 16$ (plus 8%), or about 17.3."

"Oh, and you have a log trick, don't you?"

"It's not mine. I just cover it. That's $2 \times 10^{17}$, because $\log_{10}(2) \approx 0.3$."

"Then you multiply that by 11 to get a bit more than $2 \times 10^{18}$?"

"Call it $2.2 \times 10^{18}$! But I need to add 8% on to the number part. Eight percent of 2.2 is..."

"$0.176$!" said the student, brightly.

Nod. "Call it 0.2, which makes it $2.4 \times 10^{18}$."

"And that's the right answer!"

The Mathematical Ninja somehow mimed a mushroom cloud. "Boom!" The chuckle was just the right side of maniacal.

Colin

Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.

  1. There was, as it turned out, a reason for this. []
  2. Perhaps that's why the Mathematical Ninja wasn't allowed to stand. []

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter