P-adic expansion of rational number Maybe this is a silly question but I really can not see how to get a p-adic expansion of a rational number. I do know the case of for an integer but how can I extend to the rational number case. If we get such an expansion, is it unique, i.e. different rational number has different expansion?
The book just mentions there exists such expansion but no more words, which confuse me.
Edit: I find a tutorial online :http://www.math.umn.edu/~garrett/students/reu/padic.pdf. So by the way described in this tutorial, how can we make sure the different numbers have different expansion?
 A: Although there may be special arguments in special situations, as far as I know, the only way to find the $p$-adic expansion of a rational number is by computation, either with computer help or by hand. Here’s a method.
First, I recommend using $p$-ary notation, so that $\dots dcba;_p$ represents $a+bp+cp^2+dp^3+\cdots$, just as when you write a positive integer in $p$-ary. I’ll do an example of $5$-adic division in $5$-ary notation. Let’s expand $\frac78$ as an element of $\Bbb Z_5$. Unfortunately, the method I like best can be explained very nicely in a lecture, but is almost impossible to explain in a static medium like print. I’ll show you a different approach that’s somewhat less general. First use convergent geometric series to write out the expansion of $1/(1-5)=-\frac14=1+5+5^2+5^3+\cdots=\cdots11111;_5$, and notice that this means that $-1=\cdots44444;_5$. Now you see how to change the sign of a $5$-adic number in this notation. When you subtract from $-1$, you get an exchange of digits, $0\leftrightarrow4$, $1\leftrightarrow3$, and $2\leftrightarrow2$. Then to get $-z$, you first form $-1-z$, and then add $1$ to the result.
But continuing the expansion via convergent geometric series, we have $1/(1-5^2)=-\frac1{24}=1+5^2+5^4+5^6+\cdots=\cdots010101;_5$, and $-\frac1{124}=\cdots1001001001;_5$, $-\frac1{624}=\cdots100010001;_5$, etc. What about $-\frac18$? That’s $3\cdot(-\frac1{24})=\cdots3030303;_5$, and since $7=12;_5$ and $3$ times this is $41;_5$, we get $-\frac78=\cdots414141;_5$. When we reverse the digits we get $-1-(-\frac78)=\cdots03030303;_5$ then add $1$ to get $\frac78=\cdots03030304;_5\,$.
