7

Let n be a positive integer and $$\left(1+x+x^{2}\right)^{n}=a_{0}+a_{1} x+\cdots+a_{2 n} x^{2 n}$$

then the value of $a_{0}^{2}-a_{1}^{2}+a_{2}^{2} - \dots+a_{2 n}^{2}$ is

My approach:-

Replacing $x$ by $(-1 / x),$ we get $$ \begin{array}{r} \left(1-\frac{1}{x}+\frac{1}{x^{2}}\right)^{n}=a_{0}-\frac{a_{1}}{x}+\frac{a_{2}}{x^{2}}+\cdots-a_{2 n-1} \cdot \frac{1}{x^{2 n-1}}+\frac{a_{2 n}}{x^{2 n}} \\ \text { or, }\left(1-x+x^{2}\right)^{n}=a_{0} x^{2 n}-a_{1} x^{2 n-1}+a_{2} x^{2 n-2}+\cdots+a_{2 n}..... \tag{1} \end{array} $$ And given $\left(1+x+x^{2}\right)^{n}=a_{0}+a_{1} x+\cdots+a_{2 n} x^{2 n} \ldots \ldots \ldots \ldots \ldots . \tag{2}.$ Multiplying corresponding sides of (1) and $(2),$ we have $$ \left(1+x^{2}+x^{4}\right)^{n}=\left(a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{2 n} x^{2 n}\right) \times\left(a_{0} x^{2 n}-a_{1} x^{2 n-1}+a_{2} x^{2 n-2}+\cdots+\right. $$ $\left.a_{2 n}\right) \ldots \ldots...\tag{3}$ $$ \left(1+x^{2}+x^{4}\right)^{n}=\left(a_{0}+a_{1} x^{2}+a_{2} x^{4}+\cdots+a_{n} x^{2n}+\cdots+a_{2 n} x^{4 n}\right) \ldots \ldots\tag{4} $$ Equating coefficient of $x^{2 n}$ on both sides of (3) and (4)

$$ a_{0}^{2}-a_{1}^{2}+a_{2}^{2} -\cdots +a_{2 n}^{2}=a_{n} $$

But this method seems very tedious to me.

Any other approach would be greatly appreciated

RobPratt
  • 50,938
  • Do you intend that the signs alternate throughout? – saulspatz Jun 19 '20 at 18:31
  • yes! the signs 'll alternate throughout –  Jun 19 '20 at 18:35
  • For $n=2$, I think answer does not match if my calculation is right. Please check it yourself. It will give $a_0=1, \ a_1=2,\ a_2=3, \ a_3=2,\ a_4=1$. So your answer is wrong – MAS Jun 19 '20 at 18:50
  • 2
    @M.A.SARKAR I agree with your values of $a_k$ but I also confirm Amartya's result in this case. $1^2-2^2+3^2-2^2+1^2=3$ – saulspatz Jun 19 '20 at 18:58
  • 1
    To assign numbers to equations, use e.g. \tag{4}, not .......(4). – metamorphy Jun 19 '20 at 19:00
  • 1
    @M.A.SARKAR for n = 2 ; a2=3 ....So I am correct. –  Jun 19 '20 at 19:11
  • 1
    $a_k$ is the number of ways to choose $k$ socks from $n$ pairs of socks of $n$ different colors, if two socks of the same color are indistinguishable. Writing $a_{n,k}$ to indicate the dependence on $n$, we have $$a_{n,k}=a_{n-1,k}+a_{n-1,k-1}+a_{n-1,k-2}$$ since we choose $j$ socks from the first pair, where $0\leq j\leq2$ and the remaining $k-j$ socks from the other $n-1$ pairs. I don't know whether this helps or not. This is A027907 but no simple formula for $a_{n,k}$ is given there. – saulspatz Jun 19 '20 at 19:33
  • @AmartyaRoy,I am sorry.I missed the other minus signs before the off indexed coefficients – MAS Jun 20 '20 at 10:41

2 Answers2

2

The following is essentially the idea in your proof which is conceptually simple. One has by the given, $$(1+x+x^2)^n=a_0+a_1x+\cdots+a_{2n}x^{2n}.\quad (1)$$

Replacing $x$ by $1/x$ and multiplying by $x^{2n}$ in (1), one sees that $$a_k=a_{2n-k}, 0\leq k\leq 2n.\quad (1)$$

Replacing $x$ by $-x$ in (1), one has $$(1-x+x^2)^n=a_0-a_1x+\cdots+a_{2n}x^{2n}.\quad (2)$$

Replacing $x$ by $x^2$ in (1), one has $$(1+x^2+x^4)^n=a_0+a_1x^2+\cdots a_n x^{2n}+\cdots+a_{2n}x^{4n}.\quad (3)$$

Since $1+x^2+x^4=(1+x+x^2)(1-x+x^2)$, multiplying (2) and (1) and comparing coefficients of $x^{2n}$ with (3), one has $$a_0a_{2n}-a_1a_{2n-1}+a_2a_{2n-2}+\cdots+a_{2n}a_0=a_n,$$ which after applying (1) yields $$a_0^2-a_1^2+a_2^2-\cdots+a_{2n}^2=a_n,$$ as required.

Pythagoras
  • 7,149
0

We have $$ S_{\,n} (x) = \left( {1 + x + x^{\,2} } \right)^{\,n} = \sum\limits_{k = 0}^{2n} {a_{\,n,\;k} x^{\,k} } $$ and $$ S_{\,n} (x) = x^{\,2n} \left( {1 + x^{\, - 1} + x^{\, - 2} } \right)^{\,n} = x^{\,2n} S_{\,n} (1/x)\quad \Rightarrow \,\quad a_{\,n,\;k} = a_{\,n,\;2n - k} $$ therefore the coefficients are symmetric wrt $k=n$

Then $$ \eqalign{ & S_{\,n} (x)S_{\,n} ( - x) = \left( {\left( {1 + x + x^{\,2} } \right)\left( {1 - x + x^{\,2} } \right)} \right)^{\,n} = \cr & = \left( {\left( {1 + x^{\,2} } \right)^{\,2} - x^{\,2} } \right)^{\,n} = \left( {1 + x^{\,2} + x^{\,4} } \right)^{\,n} = S_{\,n} (x^{\,2} ) \cr} $$ which implies $$ S_{\,n} (x)S_{\,n} ( - x) = \sum\limits_{k = 0}^{2n} {\left( {\sum\limits_{j = 0}^k {\left( { - 1} \right)^{\,k - j} a_{\,n,\;j} \,a_{\,n,\;k - j} } } \right)x^{\,k} } = \sum\limits_{k = 0}^{2n} {a_{\,n,\;k} x^{\,2k} } = S_{\,n} (x^{\,2} ) $$ and thus $$ \sum\limits_{j = 0}^k {\left( { - 1} \right)^{\,k - j} a_{\,n,\;j} \,a_{\,n,\;k - j} } = \sum\limits_{j = 0}^k {\left( { - 1} \right)^{\,k - j} a_{\,n,\;j} \,a_{\,n,\;2n - \left( {k - j} \right)} } = \left\{ {\matrix{ 0 & {k\,{\rm odd}} \cr {a_{\,n,\;k/2} } & {k\,{\rm even}} \cr } } \right. $$ and in particular for $k=2n$ $$ \sum\limits_{j = 0}^{2n} {\left( { - 1} \right)^{\,j} a_{\,n,\;j} \,a_{\,n,\;j} } = a_{\,n,\;n} $$

G Cab
  • 35,964