How many solutions exist for $$x+2y+4z=100$$ in non-negative integers?
The author, Martin Erickson, in his book, Aha! Solutions, published by MAA, gives the following brief solution :
There are $26$ choices for $z$, namely, all integers from $0$ to $25$. Among these choices, the average value of $4z$ is $50$. So, on average, $x+2y=50$. In this equation, there are $26$ choices for $y$, namely, all integers from $0$ to $25$. The value of $x$ is determined by the value of $y$. Hence, altogether there are $26^2=676$ solutions to the original equation.
Can somebody explain to me why this mindblowing solution works using averages?
Claim: The number of solutions to $ x + 2y = 50-2k$ plus the number of solutions to $ x + 2y = 50+2k$ is the constant 52.
We can prove this via counting: The number of solutions to $ x + 2y = K$ is $\lfloor \frac{K}{2} \rfloor + 1$.
IMO the "on average" part is dubious. I don't see this as an "Aha!" solution, unless there's more of an explanation like that above.