The even part
of a univariate polynomial
is the sum of the monomials
containing even powers of the variable.
Equivalently,
It is an even function, and is the odd part of
. The same formula defines the even
part of any univariate function whose domain
is symmetric about 0.
In number theory, the even part of a positive integer
is defined by
where is the exponent
of the exact power of 2 dividing
. The values for
, 2, ..., are 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, ... (OEIS
A006519). The even part function can be implemented
in the Wolfram Language as
EvenPart[0] := 1 EvenPart[n_Integer] := 2^IntegerExponent[n, 2]