Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If :$A=1!2!\cdots 1002!$, and $B=1004 ! 1005!\cdots2006!$, how to prove that:

a) $2AB$ is a perfect square

b) $A+B$ is not a perfect square

share|cite|improve this question
Hint: The exponent of a prime $p$ in $n!$ is $\lfloor\frac np\rfloor + \lfloor\frac n{p^2}\rfloor+ \lfloor\frac n{p^3}\rfloor+\ldots$. – Hagen von Eitzen Sep 16 '12 at 14:18

Let $e(n,p)$ denote the exponent of a prime $p$ in the number $n$. It is well-known that $$e(n!,p):=\left\lfloor\frac np\right\rfloor+\left\lfloor\frac n{p^2}\right\rfloor+\left\lfloor\frac n{p^3}\right\rfloor+\ldots.$$

For part b), let $p$ be a prime with $2p\le 1002<3p$ (and of course $p^2>1002$). This is equivalent to $334<p\le501$ and a prime in this range is readily found, e.g. $p=337$ or $p=499$. Then $e(n!,p)=0$ for $n<p$, $e(n!,p)=1$ for $p\le n<2p$, $e(n!,p)=2$ for $2p\le n\le 1002$. Therefore the exponent of $p$ in $A$ is given by $$e(A,p):=\sum_{n=1}^{1002} e(n,p) = p\cdot1+(1003-2p)\cdot 2=2006-3p.$$ Clearly $$e(B,p):=\sum_{n=1004}^{2006} e(n,p)\ge(2006-1003)\cdot2=2006>e(A,p).$$ Therefore, we have $e(A+B,p)=\min\{e(A,p), e(B,p)\}=e(A,p)$ is odd, hence $A+B$ cannot be a square.

share|cite|improve this answer
Can you complete part a ,please ? – Frank Sep 19 '12 at 10:49

Hint for a

$$x!(x+1)!=[x!]^2 (x+1)$$

It follows that

$$A= (..)^2 \cdot 2 \cdot 4 ... \cdot 1002= (...)^2 \cdot 2^{501} \cdot 501! \,.$$

do the same to $B$, which has an odd number of terms and you are done.

share|cite|improve this answer
Or note that $A\cdot1003!\cdot B=(\ldots)^2\cdot 2^{1003}\cdot 1003!$. – Hagen von Eitzen Sep 16 '12 at 15:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.