What is the pattern in factorials and squares?

In summary: However, for the prime factors themselves (2, 3, 5, 7, 11, 13, ...), I don't know yet if there's a pattern or if it's just random. In summary, the conversation discusses a pattern observed in factorials where the result of a specific formula is a perfect square for the first few factorials, but then stops applying after 16!. The formula involves taking the ceiling of the square root of n! and adding a number, which sometimes results in a perfect square. The discussion then delves into the prime factorization of n! and when a certain term in the formula will be a perfect square. It is noted that for consecutive odd factors of primes, the term
  • #1
karpmage
32
0
Hi there, I don't really have a question but I just thought I'd share something that I've found and see if anyone could make any sense of it, or find some sort of pattern in the results. I noticed that for some of the first few factorials (from 4! to 12!), (ceiling[(n!)0.5]2-n!)=a perfect square. This pattern doesn't apply for 12! and then stops applying altogether after 16! Adding a number to the square root after I round it sometimes also gives a perfect square as the final answer. (i.e. sometimes ((ceiling[(n!)0.5]+k)2-n!)=a perfect square.) I honestly don't see a pattern, but there may very well be one. I just thought I'd share it with you guys. Here are my results from Wolfram Alpha:

http://www.wolframalpha.com/input/?...[(x!)^0.5]+k)^2-x!)^0.5]),+{x,1,120}]+for+k=0
(If the answer is 0, then the end answer is a perfect square.)

http://www.wolframalpha.com/input/?...+k)^2-x!)^0.5])^(1/((10)^100+1)))^2)]+for+k=0
(Same as above, if y=0 then the answer is a perfect square.)

P.S. It's not as if I've actually found something. I'm just putting this here and maybe you guys might find some sort of pattern. I'm trying myself to see if there's one but this increases the chances I guess. I apologise if this was a stupid thing to post and the pattern is obvious, or if there is obviously no pattern. Just want to see what you guys think.
 
Last edited:
Mathematics news on Phys.org
  • #2
Here's what I observed: Let
$$n! = \left( \prod_i p_i^{2n_i} \right) \cdot \left( \prod_j q_j^{2m_j + 1} \right)$$
be the prime factorization of n! split into even and uneven powers (so pi and qi are primes). Then
$$\operatorname{ceil}(\sqrt{n!})^2 = \left( \prod_i p_i^{2n_i} \right) \cdot \left( \prod_j q_j^{2m_j} \cdot \operatorname{ceil}(\sqrt{q_j})^2 \right) = \left( \prod_i p_i^{n_i} \cdot \prod_j q_j^{m_j} \right)^2 \cdot \prod_j \operatorname{ceil}(\sqrt{q_j})^2 $$

So the question is: when is
$$\prod_j \operatorname{ceil}(\sqrt{q_j})^2$$
a perfect square? :)

Now of course, ##f(2) = f(3) = 2 = \sqrt{4}##, ##f(5) = f(7) = 3 = \sqrt{9}##, ##f(11) = f(13) = 4 = \sqrt{16}## - where f stands for the square-of-ceiling-of-root operation - so probably as long as you have odd factors of consecutive primes they will always multiply to a square (e.g. if you have one factor of 2 and one factor of 3, you get f(2) f(3) = 4).
 
Last edited:

1. What is a factorial?

A factorial is a mathematical operation that involves multiplying a number by all the numbers that come before it. For example, the factorial of 5 (written as 5!) is 5 x 4 x 3 x 2 x 1 = 120.

2. How do you calculate a factorial?

To calculate a factorial, you simply multiply the given number by all the numbers that come before it. For example, to find the factorial of 7, you would multiply 7 x 6 x 5 x 4 x 3 x 2 x 1 = 5040.

3. What is the purpose of factorials?

Factorials are commonly used in mathematical equations and probability calculations. They can also be used to find the number of possible combinations in a set of objects or events.

4. What is a perfect square?

A perfect square is a number that can be expressed as the product of two equal integers. For example, 9 is a perfect square because it can be written as 3 x 3.

5. How do you determine if a number is a perfect square?

To determine if a number is a perfect square, you can take its square root. If the square root is a whole number, then the original number is a perfect square. For example, the square root of 64 is 8, so 64 is a perfect square.

Similar threads

Replies
17
Views
2K
  • Precalculus Mathematics Homework Help
Replies
34
Views
2K
  • Linear and Abstract Algebra
Replies
2
Views
969
  • General Math
Replies
1
Views
1K
  • General Math
Replies
1
Views
1K
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • General Math
Replies
2
Views
17K
Replies
2
Views
3K
Back
Top