# Thread: [SOLVED] difference of two squares problem!!

1. ## [SOLVED] difference of two squares problem!!

the question is that K(N) denotes the no. of ways in which N can be expressed as the difference of two perfect squares, then which of the following is maximum: K(110), K(105), K(216), K(384)????
i need to know where to start from.

2. I think you should start from: $a^2-b^2=(a-b)(a+b)$. So you need to factor those numbers...

3. Hello, nandu11!

Lucky for us, I've played with the Difference-of-Squares long ago.

$K(n)$ denotes the number of ways in which $n$
can be expressed as the difference of two perfect squares.

Then which of the following is maximum? . $K(110),\;K(105),\;K(216),\;K(384)$

Suppose $n$ is a product, $PQ,$ where $P \geq Q.$

Then we want integers $a$ and $b$ so that: . $a^2-b^2 \:=\:PQ$

So we have: . $(a+b)(a-b) \:=\:PQ$

We assume that: . $\begin{array}{ccc}a+b &=&P \\ a-b &=& Q\end{array}$

. . and solve the system: . $\begin{array}{ccc}a &=&\dfrac{P+Q}{2} \\ \\[-4mm] b &=&\dfrac{P-Q}{2}\end{array}$

Since $a$ and $b$ are integers, $P$ and $Q$ must have the same parity.
. . (Both are even or both are odd.)

Let's examine each of the $n$'s.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

$n \:=\: 110 \:=\:2\cdot5\cdot11$

110 cannot be factored into two factors with the same parity.
Hence, 110 cannot be expressed as a difference of squares.
. . $K(110) \:=\:0$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

$n \:=\:105 \:=\:3\cdot5\cdot7$

105 has four possible factorings.

. . $\begin{array}{c|c}
(P,Q) & (a,b) \\ \hline
(105,1) & (53,52) \\ (35,3) & (19,16) \\ (21,5) & (13,8) \\ (7,15) & (11,4) \end{array}\quad K(105)\:=\:4$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

$n = 216 \:=\:2^3\cdot3^3$

216 has four possible factorings.

. . $\begin{array}{c|c}
(P,Q) & (a,b) \\ \hline
(108,2) & (55,53) \\ (54,4) & (29,25) \\ (36,6) & (21,15) \\ (18,12) & (15,3) \end{array} \quad K(216) \:=\:4$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

$n \:=\:384 \:=\:2^7\cdot3$

384 has six possible factorings.

. . $\begin{array}{c|c}
(P,Q) & (a,b) \\ \hline
(192,2) & (97,95) \\ (96,4) & (50,46) \\ (64,6) & (35,29) \\ (48,8) & (28,20) \\ (32,12) & (22,10) \\ (24,16) & (20,4) \end{array}$
. $K(384) \:=\:6$ . ${\color{blue}\leftarrow\text{ maximum!}}$