Method of finding a p-adic expansion to a rational number
Solution 1:
The short answer is, long division.
Say you want to find the $5$-adic expansion of $1/17$. You start by writing $$ \frac{1}{17}=k+5q $$ with $k \in \{0,1,2,3,4\}$ and $q$ a $5$-adic integer (that is, a rational number with no powers of $5$ in the denominator). Then $k$ is the first term in the expansion, and you repeat the process with $q$ to find the remaining terms.
In this case, we have $$ \frac{1}{17}=3+5\left(-\frac{10}{17}\right) $$ and so the first term is a $3$. Continuing similarly, $$ -\frac{10}{17}=5\left(-\frac{2}{17}\right) $$ and so the second term is a $0$, $$ -\frac{2}{17}=4 + 5\left(-\frac{14}{17}\right) $$ and so the third term is a $4$, $$ -\frac{14}{17}= 3 + 5\left(-\frac{13}{17}\right) $$ and so the fourth term is a $3$, and so on.
Eventually, you'll hit a remainder for the second time, and then the expansion will start repeating (just as when you're computing the repeating decimal expansion of a fraction using ordinary long division).
Solution 2:
In the case of $-1/6$, it’s very easy: $$-\frac{1}{6} = \frac{1}{1-7} = \sum_{k=0}^∞ 7^k.$$ What happens: In the $p$-adic numbers, the sequence $p^k$ is a null sequence (as $|p^k|_p = p^{-k} \overset{k → ∞}\longrightarrow 0$). Because of that and since the $p$-adic distance is ultra metric, this already ensures that the series $\sum_{k=0}^∞ p^k$ is converging – but that isn’t even needed: It’s a geometric series and so $$\sum_{k=0}^∞ p^k = \lim_{n→∞} \sum_{k=0}^n p^k = \lim_{n→∞}\frac{1-p^{n+1}}{1-p} = \frac{1}{1-p}.$$
This is done for $p = 7$ above.