The locally constant function equal to one on and minus one on its other coset has Mahler coefficients : at nonnegative integers its values are , so the forward difference operator multiplies it by . Since and the binomial polynomials have absolute value at most one on the 2-adic integers, the series converges uniformly. The binomial theorem verifies its values on the nonnegative integers, and continuity extends the identity to the entire domain.
The two cosets of are clopen sets in the 2-adic integers. The function is constant on each, so it is a locally constant function and therefore continuous. Its values on the nonnegative integers are .
The Mahler coefficient at index is the nth forward difference operator applied at zero. Here
Thus the Mahler expansion of the parity function is
To verify the expansion directly, each binomial polynomial takes values in : it does so at nonnegative integers, which form a dense subset, and polynomial evaluation is continuous into . Hence the nth summand has 2-adic absolute value at most throughout the domain. The ultrametric inequality proves uniform convergence, and the sum is continuous. At each nonnegative integer , the series becomes the finite binomial theorem identity . Equality on a dense subset and continuity prove equality everywhere. Finally, the coefficients in any such expansion are determined successively by its values at , since for and . This also verifies uniqueness without needing the general Mahler theorem.
First reduce the polynomial modulo seven. At residues , its values are respectively . Its only residue root is therefore , and is a unit. By Hensel lemma, this residue root lifts uniquely to the 7-adic integers; any other root would have to reduce to the same residue root. Thus there is exactly one root in , congruent to modulo seven.
Modulo five the values at are , so there is no residue root and hence no root in . Modulo three the only possible residue root is . But writing gives
Thus that residue root cannot lift even modulo nine, and there is no root in . A repeated residue root alone would not establish this obstruction; the second congruence is needed.
Modulo two both residues are roots. The even residue is simple because is a 2-adic unit, so Hensel lemma gives exactly one even root. For any odd 2-adic integer, , whence . No odd root can exist. Consequently the full answer is