Problem

Source: CMO 2022 P6

Tags: polynomial, algebra



For integers $0\le a\le n$, let $f(n,a)$ denote the number of coefficients in the expansion of $(x+1)^a(x+2)^{n-a}$ that is divisible by $3.$ For example, $(x+1)^3(x+2)^1=x^4+5x^3+9x^2+7x+2$, so $f(4,3)=1$. For each positive integer $n$, let $F(n)$ be the minimum of $f(n,0),f(n,1),\ldots ,f(n,n)$. (1) Prove that there exist infinitely many positive integer $n$ such that $F(n)\ge \frac{n-1}{3}$. (2) Prove that for any positive integer $n$, $F(n)\le \frac{n-1}{3}$.