Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Factorials and squares

  1. Jul 9, 2013 #1
    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:

    (If the answer is 0, then the end answer is a perfect square.)

    (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 wanna see what you guys think.
    Last edited: Jul 9, 2013
  2. jcsd
  3. Jul 9, 2013 #2


    User Avatar
    Science Advisor
    Homework Helper

    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: Jul 9, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Factorials and squares
  1. Factorial of infinity (Replies: 1)

  2. Factorials of Fractions (Replies: 16)

  3. Inverse Factorials (Replies: 13)