Divisibility of $(x+2y)^{2n}-x^{2n}$ by $2$ Let $n$ be a positive integer. What is the largest integer $f(n)$ such that there exists $p\in \mathbb{Z}[x, y]$ such that $$(x+2y)^{2n}-x^{2n}=2^{f(n)} p?$$
I have computed it for some small values and my conjecture is that $f(n)$ is the order of divisibility of $n$ by $2$ plus $2$ (e.g. $f(1)=2$). Is this correct?
 A: By the binomial theorem, the left-hand side is simply
$$\sum_{i=1}^{2n} \binom{2n}{i} 2^i y^i x^{2n-i},$$
so $f(n)$ is just
$$\min_{1 \leq i \leq 2n} v_2\left(\binom{2n}{i} 2^i\right) = \min_{1 \leq i \leq 2n} \left(i + v_2 \binom{2n}{i}\right),$$
where $v_2(x)$ is the number of times $2$ divides $x$. So, as noted by another commenter, you have found an upper bound for $f(n)$ (simply choose $i = 1$ to get $i +v_2\binom{2n}{i} = v_2(n)+2$). By Kummer's Theorem, $v_2\binom{2n}{i}$ is the number of carries performed when adding $i$ to $2n-i$ in binary. We can use this to show that the upper bound you gave is indeed the exact value of $f(n)$.
First, suppose $i \geq 2^{v_2(2n)}$. Then
$$i + v_2\binom{2n}{i} \geq 2^{v_2(2n)} = 2 \cdot 2^{v_2(n)} \geq 2(v_2(n)+1) = 2v_2(n) + 2 \geq v_2(n) + 2,$$
as desired.
Now consider the case where $1 \leq i < 2^{v_2(2n)}$. The binary expansion of $2n$ ends with exactly $v_2(n)+1$ zeros, and by assumption the binary expansion of $i$ has at most $v_2(n)+1$ digits. Thus, the last $v_2(n)+1$ binary digits of $2n-i$ are simply the binary digits of $2^{v_2(n)+1} - i$, and the number of carries performed when adding $i$ to $2n-i$ is at least the number of carries performed when adding $i$ to $2^{v_2(n)+1} - i$. By thinking through the addition algorithm, this is seen to be simply $v_2(n) - v_2(i) + 1$. So we want to show that $i + v_2(n) - v_2(i) + 1 \geq v_2(n) + 2$, which is true since $i > v_2(i)$ for all positive integers $i$.
