For each positive integer $n$, find the number of odd coefficients in the expansion of $( x^2 + x + 1) ^ n$.

I came across this problem and found it interesting. I would like to see how others approached it.

Note: This is a IMO shortlist problem.

No vote yet

1 vote

×

Problem Loading...

Note Loading...

Set Loading...

$</code> ... <code>$</code>...<code>."> Easy Math Editor

`*italics*`

or`_italics_`

italics`**bold**`

or`__bold__`

boldNote: you must add a full line of space before and after lists for them to show up correctlyparagraph 1

paragraph 2

`[example link](https://brilliant.org)`

`> This is a quote`

Remember to wrap math in $</span> ... <span>$ or $</span> ... <span>$ to ensure proper formatting.`2 \times 3`

`2^{34}`

`a_{i-1}`

`\frac{2}{3}`

`\sqrt{2}`

`\sum_{i=1}^3`

`\sin \theta`

`\boxed{123}`

## Comments

Sort by:

TopNewestFor each positive integer n, find the number of odd coefficients in the expansion of $( x^2+x+1)^n.$

Let f(n) be the desired number of odd coefficients in $( x^2+x+1)^n.$

... I will be using n=6039 as an example:

1) Write n in base 2 ... $6039 = 1011110010111_2.$

Definition: a 1_string is a string of 1's of maximal length in a base 2 number.

For example: 6039 has 4 1_strings. Their lengths are 1, 4, 1 and 3, resp.

2) Examine n's 1's to find all of its 1_strings.

Define f_values for the 3 types of 1_strings:

. a 1_string of length 1 has an f_value of 3.

. a 1_string of even length, le, has an f_value of $(2^{le+2}-1)/3.$

. a 1_string of odd length, lo, has an f_value of $(2^{lo+2}+1)/3.$

Then f(n) = product of the f_values of n's 1_strings.

For n=6039:

Since 6039's 1_strings have lengths of 1, 4, 1 and 3 resp.

Their f_values are 3, 21, 3 and 11, resp.

So f(6039) = 3 X 21 X 3 X 11 = 2079.

Excellent problem ...

I found pretty quickly that for all n>=0, $f(2^n) = 3.$

After that I made little further progress, I decide to research the problem. I found, online the book

(PDF) Enumerative Combinatorics by Richard Stanley where I found how to compute f(n).

Log in to reply

I cheated a little bit (ok, a lot):

http://oeis.org/A071053

I don't see anything like a closed-form formula. This paper seems to be all about finding this function's asymptotics:

http://arxiv.org/abs/0802.2654

I can show that the answer is $3$ if $n$ is a power of $2$. :)

Log in to reply

There is a way to define the number of coefficients in a closed form formula, i.e. only depends on the value of $n$.

Log in to reply

I get $\text{Coefficient of} \ x^r=\displaystyle\sum_{k=0}^{\lfloor r \rfloor /3} (-1)^k \dbinom{n+3-3k-1}{r-3k} \dbinom{n}{k}$ where $\lfloor r \rfloor$ is the greatest multiple of $3$ less than or equal to $r$, and $r \in \{0,1, \ ... \ ,2n \}$ .

How do we know how many of these monsters are odd?

Log in to reply

Note that you are not asked to find explicitly which ones are odd, just the total number of them that are odd.

For example, if we were merely dealing with $(x+1)^n$, then it is a well known result that the number of odd coefficients is $2^b$, where $b$ equals the number of 1's in the binary representation of $n$. There can be several ways to show this, one of which includes finding explicitly which terms are odd (using Lucas Theorem).

Log in to reply

I got a somewhat similar result.Is there an easy way to see if a binomial is odd or even?

Log in to reply

So...

$(x^2+(x+1))^n$? Hmmmmm.... the answer will be in terms of x. Can't wait to see the solutions (wish had time to solve it)!

Log in to reply

The answer will be in terms of $n$.

For example: If $n = 1$, then we have $x^2 + x + 1$, which has 3 terms of odd coefficients.

If $n = 1$, then we have $(x^2 + x + 1)^2 = x^4 + 2x^3 + 3x^2 + 2x + 1$, which has 3 terms of odd coefficients.

If $n = 3$, then we have $(x^2 + x + 1) ^3 = x^6 + 3x^5 + 6x^4 + 7x^3 + 6x^2 + 3 x + 1$, which has 5 terms of odd coefficients.

Log in to reply

Oh I see... only thought of x because in expansion of form (variable+number)^N the number shapes the coefficients. But I never thought out the number theory rules of odd

odd, oddeven etc. Yes the answer may be (or, like you said, will be) in terms of n. And now it'll be great to see why it's $n+2$ (or maybe not ;))Log in to reply

Can you say more things about IMO problems I just heard about them from this note. How can you post a solution?

Log in to reply

Well, using trinomials I found the formula for the coefficients but it's a sum of trinomials and I can't find any easy parity criteria for that.

Log in to reply

Or maybe if we denote $k_n$ the coeff of x^k in the polynomial, we can get that $\displaystyle k_n=\sum_{i=1}^{n-1} (k-1)_i+(k-2)_i$

Log in to reply

Calvin My questions are not been rated yet They have been uploaded 3days before Plz give me your e mail id so that i can contact you Your's faithfully Jai gupta

Log in to reply

It is a lot easier for your problems to be rated if you state the topic and the (perceived) level of the problem. Note that it also depends on the number of people who have viewed and answered your problem.

I typically do not like "Find this pattern" unless it is very obvious, since there are numerous ways of justifying the next term (e.g. there is always a polynomial which satisfies any finite sequence). I appreciate seeing your solutions, but I don't understand them. Can you please reply to my comments? Thanks.

Log in to reply

Kkk Calvin now i will not upload that type questions which are controversial Satvik also told me the same but love mat thats why i was uploading but now ill not

Log in to reply

I have a question about it through, please reply to my comment in your solution.

Log in to reply