Even Part

Author

Eric W. Weisstein
September 15, 2007

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/EvenPart.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/EvenPart.html.

©2007 Wolfram Research, Inc. except for portions noted otherwise

Code

EvenPart[0]:=1
EvenPart[n_Integer]:=2^IntegerExponent[n,2]
SetAttributes[EvenPart,Listable]

Table

EvenPart[Range[20]]

Plot

<<Utilities`Plot`

IntegerListPlot[EvenPart[Range[100]],PlotRange->All,AxesLabel->{n,Ev[n]}]