How would you go about writing $1/3=\sum\limits_{n=-k}^{\infty}a_n 2^{n}$ where $a_n=0,1$ I want to show that every $p$-adic number can be written as $\sum\limits_{n=-k}^{\infty}a_n p^{n}$ where $a_n=0,1,...,p-1$. But I got stuck with the example I came up with. By  write I am asking how to figure out the coefficients $a_n$.
 A: Write $3=2+1$, then with $3^{-1}=\sum a_n2^n$ we have

$$1=3\cdot\sum_{n}a_n2^n = a_0 + \sum_{n=1}^\infty (a_n+a_{n-1})2^n$$

So $a_0=1$ which implies $a_1=1$ since otherwise we have a $2^1$ not cancelable by anything. This implies $a_2+a_1+1$ has to be even in order to raise the next power i.e. it must be equal to $2$ as well--there are three summands, and one of them is $1$ so you cannot reach $0$ or $4$--and since $a_1=1$ we get $a_2=0$, and again we see $a_3+a_2+1=2$ so that $a_3=1$ and inductively we see $a_n+a_{n-1}+1=2$ each time (since $0$ or $4$ are impossible) and we conclude all the odd coefficients are $1$ and all the even ones are $0$ hence

$$3^{-1} = 1 + \sum_{n=0}^\infty 2^{2n+1}$$

A: Using what I’m hoping will be standard binary expansion of a $2$-adic number, the reciprocal of $1/3$ is $\dots10101011;\,$, meaning $1+2+8+32+128+\cdots$.
Check the geometric-series part of this, namely $2+8+32+\cdots$, evaluating as $2/(1-4)=-2/3$ using the formula for geometric series. Add $1$ and get $1/3$.
You can get to this result by doing long division of $11;$ into $1;\,$— unfortunately, this is hard to describe in print but easy at a blackboard. It proceeds right to left, unlike regular long division, which goes left to right.
A: We know from the sum to infinity of a geometric progression that
$$1=\frac 12+\frac 14+\frac 18+\frac 1{16}\cdots=(0.111111\cdots )_2$$
Here we want to find $x_2=1_{10}\div 3_{10}=1_2\div 11_2$ such that $$\begin{align}
x_2\cdot11_2&=1_2\\
&=(0.111111\cdots )_2\\
\Rightarrow x_2&=(0.0101010101\cdots)_2\\
&=\frac 1{2^2}+\frac 1{2^4}+\frac 1{2^6}+\cdots\\
&=\sum_{r=1}^ \infty 2^{-2r}
\end{align}$$ 
