Find all positive integers $n$ for which all coefficients of polynomial $P(x)$ are divisible by $7,$ where \[P(x) = (x^2 + x + 1)^n - (x^2 + 1)^n - (x + 1)^n - (x^2 + x)^n + x^{2n} + x^n + 1.\]
Problem
Source: Turkey National Olympiad 2006 - D1 - P3
Tags: algebra, polynomial, number theory unsolved, number theory
07.01.2007 13:22
In other words, $7 | P(a)$ for any integer $a$. We use the fact that $a^{6k+l}\equiv a^{l}(mod 7)$ $P(0) = 0$ $P(1) \equiv 1+3^{n-1}-2^{n}\equiv 0 (mod 7)$ By checking $n$ in $mod 6$, we have either $n \equiv 1 (mod 6)$ or $n \equiv 2 (mod 6)$. $P(-1) = 3-2^{n}+(-1)^{n}$ *) $n = 6k+1 \Rightarrow P(-1) = 3-2^{6k+1}+(-1)^{6k+1}\equiv 3-2-1 \equiv 0 (mod 7)$ *) $n = 6k+2 \Rightarrow P(-1) = 3-2^{6k+2}+(-1)^{6k+2}\equiv 3-4+1 \equiv 0 (mod 7)$ $P(2) \equiv (1-6^{n})+(2^{n}-5^{n})+(4^{n}-3^{n}) (mod 7)$ *) If $n$ even, then it's clear that $7|P(2)$ *) $n = 6k+1 \Rightarrow P(2) \equiv 0+1-6+2-5+4-3 \equiv 0 (mod 7)$ $P(3) \equiv 6^{n}-4^{n}-5^{n}+2^{n}+1$ *) $n = 6k+1 \Rightarrow P(3) \equiv 6-4-5+2+1 \equiv 0 (mod 7)$ *) $n = 6k+2 \Rightarrow P(3) \equiv 36-16-25+4+1 \equiv 0 (mod 7)$ $P(-3) \equiv-3^{n}-5^{n}-6^{n}+2^{n}+4^{n}+1$ *) $n = 6k+1 \Rightarrow P(-3) \equiv-3-5-6+2+4+1 \equiv 0 (mod 7)$ *) $n = 6k+2 \Rightarrow P(-3) \equiv-9-25-36+4+16+1 \equiv 0 (mod 7)$ Hence, the answer is all $n \equiv 1 (mod 6)$ or $n \equiv 2 (mod 6)$ ($n \in \mathbb{N}$)
07.01.2007 13:25
Sorry, for example $2|a^{2}+a$ for any integer $a$, but the coefficients are not divisible by $2$...
07.01.2007 14:14
TomciO is right it says its coefficients are divisible by 7
07.01.2007 15:25
Oh, okay, I made a mistake... But at least the answer must be $1 (mod 6)$ or $5 (mod 6)$.. I'll try to complete the solution, thx for correcting..
13.01.2007 13:59
still no solution...
13.01.2007 16:15
It is easy to show, that $P_{n}(x)=\sum_{m}a_{m}x^{m}$ had symmetric koefficients $a_{k}=a_{2n-k}$. Therefore sufficiently calculate $a_{m}, m\le n$. We have \[a_{m}=\sum_{k=[m/2]+1}^{m-1}C_{n}^{k}C_{k}^{m-k}.\] It give $a_{0}=a_{1}=a_{2}=0, a_{3}=n(n-1),a_{4}=\frac{n(n-1)^{2}}{2},...$ It give $7|P_{n}(x)$ if and only if $7|n(n-1)$.
14.01.2007 08:53
i dont think it was the only necessary relation just look at the second post
24.01.2007 13:11
answer is $7^{k}$ and $7^{k}+7^{l}$ such that $k$ and $l$ are integers, $k,l>-1$
13.10.2019 02:58
We claim that the only possibilities are integers of the form $7^k$ or $7^k + 7^\ell$, where $k, \ell \in \mathbb{Z}_{\ge 0}.$ Let us first show that no other numbers work. Firstly, define $P_n(x)$ to be $(x^2+x+1)^n - (x^2+1)^n - (x+1)^n - (x^2+x)^n +x^{2n}+x^n+1$ and $Q_n(x) = P_n'(x)$ for each $n \in \mathbb{N}.$ Also define $R_n(x) = (x^2+x+1)^{n} - (x^2+1)^{n} - (x^2+x)^{n} + (x^2)^{n}$ for each $n \in \mathbb{N}.$ Then, we have that: $$\frac{Q_n(x)}{n} = (x^2+x+1)^{n-1}(2x+1) - (x^2+1)^{n-1}(2x) - (x+1)^{n-1} - (x^2+x)^{n-1}(2x+1) + 2x^{2n-1} + x^{n-1}. \qquad (1)$$ Call a positive integer $n$ tasty if $P_n(x)$ has all coefficients divisible by $7$. Lemma 1. If $n$ is tasty, then either $n = 2$ or $n \equiv 0, 1$ (mod $7$).
Lemma 2. If $n$ is a multiple of $7$, then $n$ is tasty if and only if $\frac{n}{7}$ is.
The following two lemmas are proven in analogous ways as Lemmas $1, 2$, and so the proofs are left as exercises to the reader. Lemma 3. If $R_n(x)$ has all coefficients divisible by $7$, then $n \equiv 0, 1$ (mod $7$). Lemma 4. If $n$ is a multiple of $7$, then $R_n(x)$ has all coefficients divisible by $7$ if and only if $R_{\frac{n}{7}}(x)$ does. The following lemma will later prove very useful. Lemma 5. If $R_n(x)$ has all coefficients divisible by $7$, then $n$ is a power of $7$.
Call a positive integer $n$ good if $Q_n(x)$ has all coefficients divisible by $7$. The following is the key claim. Claim. A positive integer $n \equiv 1$ (mod $7$) is good if and only if $n-1$ is a power of $7$.
Lemma 7. If $n \equiv 1$ (mod $7$) is tasty, then it is either $1$ or of the form $7^k+1$ for some $k \in \mathbb{N}.$
Hence, from Lemmas $1$ and $7$, we know that all tasty $n$ are either $1, 2,$ multiples of $7$, or of the form $7^k+1$ for $k \in \mathbb{N}.$ By Lemma $2$, we know that if some positive integer $n = 7^x \cdot t$ where $7 \nmid t$ and $x > 0$ is tasty, then $t$ is tasty. Hence, we have either $t = 1$, $t = 2$, or $t = 7^k + 1$ for some $k \in \mathbb{N}.$ This clearly implies that all multiples of $7$ which are tasty are either powers of $7$ or sums of two powers of $7$. The previous discussion easily shows that all tasty numbers must be of the form $7^k$ or $7^k + 7^\ell$, where $k, \ell \in \mathbb{Z}_{\ge 0}.$ Let's now show that all of these numbers are actually tasty. By Lemma $2$, it suffices only to show that $1, 2,$ and numbers of the form $7^k+1$ for $k \in \mathbb{N}$ are tasty. It's easy to check by hand that $1, 2$ are tasty, so let's just show that $7^k+1$ is tasty for all $k \in \mathbb{N}.$ Observe that by Legendre's Formula, the only triples $(a, b, c) \in (\mathbb{Z}_{\ge 0})^3$ with $7 \nmid \frac{n!}{a! b! c!}$ are permutations of $(7^k + 1, 0, 0)$ or of $(7^k, 1, 0).$ With this observation, it's quite easy to show that $7^k+1$ is tasty for all $k \in \mathbb{N}.$ We have therefore shown that all positive integers $n$ of the form $7^k$ or $7^k + 7^\ell$, where $k, \ell \in \mathbb{Z}_{\ge 0}$, are indeed tasty, and so hence that is our answer. $\square$