In number theory, for a given prime number p, the p-adic order or p-adic valuation of a non-zero integer n is the highest exponent ν {displaystyle u } such that p ν {displaystyle p^{ u }} divides n. The p-adic valuation of 0 is defined to be infinity. The p-adic valuation is commonly denoted ν p ( n ) {displaystyle u _{p}(n)} . If n/d is a rational number in lowest terms, so that n and d are coprime, then ν p ( n d ) {displaystyle u _{p}({ frac {n}{d}})} is equal to ν p ( n ) {displaystyle u _{p}(n)} if p divides n, or − ν p ( d ) {displaystyle - u _{p}(d)} if p divides d, or to 0 if it divides neither. The most important application of the p-adic order is in constructing the field of p-adic numbers. It is also applied toward various more elementary topics, such as the distinction between singly and doubly even numbers. In number theory, for a given prime number p, the p-adic order or p-adic valuation of a non-zero integer n is the highest exponent ν {displaystyle u } such that p ν {displaystyle p^{ u }} divides n. The p-adic valuation of 0 is defined to be infinity. The p-adic valuation is commonly denoted ν p ( n ) {displaystyle u _{p}(n)} . If n/d is a rational number in lowest terms, so that n and d are coprime, then ν p ( n d ) {displaystyle u _{p}({ frac {n}{d}})} is equal to ν p ( n ) {displaystyle u _{p}(n)} if p divides n, or − ν p ( d ) {displaystyle - u _{p}(d)} if p divides d, or to 0 if it divides neither. The most important application of the p-adic order is in constructing the field of p-adic numbers. It is also applied toward various more elementary topics, such as the distinction between singly and doubly even numbers. Let p be a prime in ℤ. The p-adic order or p-adic valuation for ℤ is the function ν p : Z → N {displaystyle u _{p}:mathbb {Z} o mathbb {N} } defined by where N {displaystyle mathbb {N} } denotes the natural numbers. For example, ν 3 ( 45 ) = 2 {displaystyle u _{3}(45)=2} since 45 = 3 2 ⋅ 5 1 {displaystyle 45=3^{2}cdot 5^{1}} . The p-adic order can be extended into the rational numbers as the function ν p : Q → Z {displaystyle u _{p}:mathbb {Q} o mathbb {Z} } defined by For example, ν 5 ( 9 10 ) = − 1 {displaystyle u _{5}({ frac {9}{10}})=-1} .