# Largest prime factor

Let $$n = (1^2 - 0^2) * (2^2 - 1^2) * (3^2 - 2^2) * (4^2 - 3^2) * ... (100^2 - 99^2).$$

What is the largest prime that divides n? Please explain how to go about solving this, for I have never seen such a problem before.

Do you know the difference of squares formula? $$a^2-b^2=(a+b)(a-b)$$ Using this, your equation can be rewritten as: $$n=(1-0)(1+0)(2-1)(2+1)(3-2)(3+2)\dots (100-99)(100+99)$$ $$n=(1)(1)(1)(3)(1)(5)\dots (1)(199)$$ $$n=(3)(5)(7)\dots (199)$$ We can see that the largest prime that divides $n$ is $199$. All other factors of $n$ that are greater than $199$ are composite numbers.

• Thank you! And I'm guessing that the sum of two squares can never be composite, right? – Princee Apr 10 '14 at 5:26
• The sum of two squares can be composite. The pythagoean triples are great examples. $3^2+4^2=5^2$, which is not a composite number – TrueDefault Apr 10 '14 at 5:53

Hint. $$n=(1-0)(1+0)(2-1)(2+1)(3-2)(3+2)\cdots(100-99)(100+99)\ .$$

Use "difference of squares": $(a^2-b^2)=(a+b)(a-b)$. From there you should be able to find the greatest prime factor pretty quickly.