The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

The Square Root of n!

Date: 10/14/98 at 08:14:43
From: preston Johnson
Subject: Algebra, square roots, and factorials

For what natural numbers n is the square root of n! an integer?

I tried putting different numbers in for n. If I did the problem at all 
right, 1, 23, and 24 all work. I do not know how to go about this 
problem or how to set up an equation. If you could help, that would be 

Date: 10/14/98 at 09:30:41
From: Doctor Mitteldorf
Subject: Re: Algebra, square roots, and factorials

Dear Preston,

Among factorials, only 0! and 1! are perfect squares. Your result for 
23 and 24 is probably due to the round-off error in your calculator or 

To prove that a factorial bigger than 1 can't be a perfect square, 
first think about breaking down the factorial into prime factors. For 
example, 4! = 24, and 24 = 2*2*2*3. In order for any number to be a 
perfect square, it must contain an even number of each prime factor.  
Now think about the largest prime less than or equal to n. Call that 
number p. That number appears only once in the list of factors 
1*2*3*4*5*...*p*...*n, so it can't appear an odd number of times 
unless 2*p is also less than n.

Now there's a semi-famous theorem called Bertrand's Postulate, which 
says that there is always a prime number between n and 2n. This is just 
what you need to show that 2p isn't less than n - because if it were, 
there would have to be a larger prime than p that is also less than n. 
The proof of Bertrand's postulate isn't easy, but you can read it at:   

You may also be interested in programming in a language that allows 
you to work with numbers that have more than 20 or so digits, which 
most calculators and computer programing languages can't do.  Look at 
the program Mathematica - it contains wonders!

- Doctor Mitteldorf, The Math Forum   
Associated Topics:
High School Number Theory

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.