Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Stirling Work

Age 16 to 18
Challenge Level Yellow starYellow star
  • Problem
  • Student Solutions

Part 1: Estimate of n


$\sqrt{n} > 100$
$n> 10^4$

$\sqrt{n} > 1000\ 000$
$n> 10^{12}$

$\sqrt{n} > 1000\ 000\ 000\ 000$
$n> 10^{24}$

$n^n> 100$
$n\log n> \log 100$

Using the interval bisection method: $n$ is greater than 3.59728502354042

 

$n^n> 1000\ 000$

$n\log n> \log 1\ 000\ 000$

Using the interval bisection method: $n$ is greater than 7.06579672829962

 

$n^n> 1000\ 000\ 000\ 000$

$n\log n> \log 1000\ 000\ 000\ 000$

Using the interval bisection method: $n$ is greater than 11.3673178030006

Interval Bisection tables
 

Part 2:

$n!=1 \times 2 \times 3 \times 4 \times \dots (n-1) \times n$

Taking logs:

$$
\begin{align*} \ln(n!) &= \ln (1 \times 2 \times 3 \times 4 \times \dots (n-1) \times n) \\&= \ln 1 + \ln 2 +\ln 3 +...\ln(n-1) +\ln(n) \\&= \sum_{i=1}^n\ln(i) \approx\int^n_1\ln(x)\,dx
\end{align*}$$

where we've assumed n is large when replacing the sum by an integral. We can evaluate this integral using integrating by parts: 

$$ \int \ln(x) \,dx = x \ln(x) - \int 1 \,dx = x\ln(x) - x = \ln(x^x) - x$$
Substituting the limits of integration gives: $$\ln(n!) = \ln(n^n) -n - (\ln(1^1) - 1)$$
Taking exponentials: $$n!= e^{\ln(n^n) -n + 1}=n^n e^{1-n}$$
Comparing with the form of the approximation given (for large n) it can be seen that we should use the approximation:
$$n! \sim A n^{ +n\pm 0.5} e^{-n} $$
We now need to find the value of the constant A and work out the remaining sign in the term $n^{\pm0.5}$.

If we temporarily let the constant $= 1$ and then compare the values obtained from $An^{n-0.5}e^{-n}$ and $An^{n+0.5}e^{-n}$ with $n!$ for a range of $n$, the results are listed in the spreadsheet below.

Spreadsheet

From the spreadsheet it can be seen that $An^{n+0.5}e^{-n}$ with a constant $A$ greater than unity, will provide the appropriate form. If we were to use the other possible form, $An^{n-0.5}e^{-n}$, we would need an extremely large value of $A$.

Estimate of $A$:

By simply dividing column E by coumn D in the above spreadsheet it can be seen the value of $A$ starts at around 2.6 (for small $n$) and tends to around 2.5 (for large $n$). The exact value of $A$ is actually $\sqrt{2\pi} \approx 2.506628275$
 

Part 3:


There appears to be no limit to the factorial which may be calculated if the answer is left in an algebraic form. Using the formula in Excel, $142!$ was the largest number that I was able to compute. The value of the real and approximated results are listed below.

$142!= 2.695364137888160 \times 10^{245}$


$\sqrt{2\pi} \times 142^{142 +0.5}e^{-142} =2.693782818480670 \times 10^{245}$

Percentage difference = 0.058668118 %

 

You may also like

Big, Bigger, Biggest

Which is the biggest and which the smallest of $2000^{2002}, 2001^{2001} \text{and } 2002^{2000}$?

Infinite Continued Fractions

In this article we are going to look at infinite continued fractions - continued fractions that do not terminate.

Gosh Cosh

Explore the hyperbolic functions sinh and cosh using what you know about the exponential function.

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo