p-adic Norm

Author

Eric W. Weisstein
March 29, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Algebra/p-adicNorm.nb.

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

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

Code

PadicNorm[x_,p_]:=Module[{a=Cases[FactorInteger[x],{p,_}]},
If[a==={},1,First[1/Power@@@a]]
]

Examples

PadicNorm[5/3,#]&/@{2,3,5}