Is there an integer n > 1 such that n ! is a perfect square?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Note: this problem originally asked for the first value of n for which n ! is a perfect square and to enter − 1 if no such number exists. Now that Brilliant has changed it to a Yes or No question, the answer is just No .
Very nice explanation. Thanks.
Hello, I would like to see a proof of Bertrand's Postulate... other than that, quite a venerable and noble proof!
Wondering why it's not called Bertrand's theorem. Apparently he didn't prove it for all n. Chebyshev did. Thus it's known as the Bertrand-Chebyshev theorem.
you spelt from wrong in the 2nd to last line
I don't understand where primes come into play here. A perfect square is made up of any positive integer squared - like 4^2, 6^2, 8^2, etc. No primes have to be involved. Any input?
Log in to reply
He is using the fact that any integer is a perfect square if and only if its prime factorization contains only factors raised to an even power. That way, if you manage to prove that for any n>1, n! must contain at leat one prime factor whose power is odd, it cannot be a perfect square ^.^
I kind of find this question to be unfair. If the expectation is that it can be answered by applying Bertrand's Postulate, then - well - a Postulate is not proved (yet), so the answerer cannot be sure of their answer. If the expectation is to know that it was proved (by Chebyshev), there's no way this question is anything less than Expert Level.
This is almost the same as Jason's solution but structured differently.
First notice that in the prime factorisation of a perfect square, every prime factor occurs (at least) twice.
Then notice that highest prime factor of n! (n>1) occurs exactly once! ( If p is the highest prime factor of n! we know by Bertrand's postulate that 2p (and so all larger multiples of p) are more than n and so do not appear in n! Furthermore a second p cannot be made by multiplying other numbers from n!, because p is a prime.)
Put the two observations together and we are done.
(Thanks to those who pointed out that I cannot avoid appealing to Bertrand to complete this solution)
Wow, you’re way of showing there’s an unpaired prime is much simpler than mine. Well done!
Maybe I’m missing something here, but it seems like you need to prove, if p is the highest prime factor of n!, that n < 2p, or even 3p etc.. and thus your assertion that p can only appear once as a factor in n!. Of course, for low values of n, we know what the prime numbers < n are, we’re familiar with them so it seems obvious, but don’t you need to cite this Bertrand’s Postulate to actually prove that for all n?
For example, if there were no prime numbers between 13 and 26, then 13 would be the highest prime factor of 26!, and 26! contains two factors of 13. We happen to know that there are primes between 13 and 26, but I think you need to prove that that will be true for all n > 1, i.e. cite Bertrand’s Postulate, no?
Log in to reply
I thought the same. You either prove it yourself that there are always prime(s) between an integer and its double or you cite the postulate.
Any p < n/2 will appear again in n! as the factor (2p).
You're implicitly using Bertrand.
Starting the product with 2 3 4*….., we note that when we come to a prime p, we must extend the product to 2p in order for the product to have the factor p^2. But there is always a new prime, q, such that p < q < 2p, so we must extend the product to 2q. The argument can be extended forever by Bertrand's postulate, so there cannot be any perfect square. Ed Gray
What about 26! = 4,03291E+26. Its square root is 20082117944246,0000000000000000000
Log in to reply
26! at the first glance contains at least 3 singular prime numbers: 23, 19, 17 so can't be the right answer.
26! ends in 6 zeroes, so its purported square root would end in 3. What you have is a value rounded off be placeholding limitations in a calculator. Try repeating what you did with any other number between 20 and 30.
I approached it the same way, observing that all we need to show that there aren’t any perfect square factorials is to show that there is always at least one prime greater than n/2 and less than or equal to n. I didn’t know Bertand’s Postulate, cited by Jason Carrier, but I did look at the number of primes between n/2 and n as n increases exponentially (100, 1000, etc.) and the number of primes does continue to increase so there’s always at least one!
If n ! = n ( n − 1 ) ⋯ 2 = k 2 for some k ∈ N , then every prime p ≤ n divides k 2 , and consequently, every such prime p ∣ k . If q is the largest prime ≤ n , then q 2 ∤ n ! . Otherwise, ∃ r ∈ { q + 1 , q + 2 , ⋯ , n } that is a multiple of q , implying n ≥ 2 q . Since for any positive integer x , there is a prime between x and 2 x , there is a prime s such that q < s < 2 q ≤ n contradicting the maximality of q . Since q 2 ∣ k 2 yet q 2 ∤ n ! , n ! = k 2 .
Perfect squares are integers that have two equivalent factors, however more formally see Jason Carrier’s answer.
The number 16 has the two factors 4, 81 has two 9s and so on.
Factorials however multiply a number by all the positive integers preceding and it, so there are no two identical factors to make it a perfect square.
It's not very rigorous, but here goes. Every n! beyond n>1 will contain a 2 as a factor. If you take the square root of that product n!, then you will get the square root of a 2 as a part of that product. With the square root of a 2 being irrational, every product will be irrational and therefore can't be a perfect square.
Your reasoning is slightly flawed. 6! is divisible by 2, as you noted, but it is also divisible by 16, which does have an integer root. 6! is not a square because it’s square root is 12 • root(5), not because it is a multiple of root 2.
In factorial we don’t twice numbers but in perfects squares we do twice numbers
I think your reasoning is on track, but incomplete. If I multiply 2, 3, and 6 together, I have not repeated any numbers, but I get 36, a square. You should instead look at the factors of the numbers being multiplied.
Let p be the greatest prime in the range 1 to n inclusive. Because of Bertrand's Postulate, which states that there is always a prime between an integer k and 2 k , n < 2 p otherwise it would contradict the fact that p is the greatest prime in the range. This further implies that n < 2 p ≤ p 2 (Equality occurs when n = 2 ). For a number to be a square number, its prime factorization has to contain primes all of which are elevated to an even power. However in the prime factorization of n ! , p will be to the power of 1 , which is not even, and hence n ! cannot be a square.
For n! As n keeps on increasing your self with an uneven amount of factors when you have n!=2*a, is an even number. Therefore, a must be a odd number although if odd then it is not a perfect square since. There is always a prime factor(b) inside. b has no factors less than its self and one.
For n! to be square, n-(n-1) n-(n-2) ...*(n-1) must equal n. This clearly never happens so no n causes n! to be a perfect square.
Problem Loading...
Note Loading...
Set Loading...
For a number to be a square, its prime factors must each appear an even number of times. So, we’ll examine the behavior of prime factors as we increase n .
We start with n = 2 , where we have an unpaired factor of 2. The next number with a factor of 2 is twice 2, or 4, so we have to make it to at least n = 4 to get a square. (Note that 4 has 2 factors of 2, so it actually wouldn’t balance our 2’s, but this turns out not to be important.) Before we can make it to 4, we have another unbalanced prime, 3. The next number with a factor of 3 is twice three, or 6. So, n must be at least 6. You can probably see the pattern: before reaching 6, we get an unbalanced factor of 5. And before reaching 10 (twice 5), we encounter 7.
What we are observing is called Bertrand’s Postulate , which tells us that for every n > 1 , there exists a prime p such that n < p < 2 n . In other words, before we can balance the current prime, by reaching its double, we will encounter at least one new, unbalanced prime. So, our square-finding efforts were doomed fron the start, and the primes never balance. The answer is then − 1