Raising a rational integer to a $p$-adic power Let $p$ be a prime number and $d$ a positive integer. If $n\in \mathbb{Z}_p$ (the ring of $p$-adic integers) how would one define $d^n$? 
Under what conditions would this be an element of $\mathbb{Z}_p$?
Any help would be very much appreciated.
 A: This is defined if (and only if) $d$ is congruent to 1 mod $p$. You can see this by thinking about the limit (in the $p$-adic topology) of $d^{n_i}$, where $n_i$ is some sequence of integers converging $p$-adically to $n$. If $d$ is is $1 \pmod p$, then the limit exists in $\mathbb{Z}_p$, and this is the natural definition of $d^n$.
A: Assume that $d\equiv1\pmod p$ as others have pointed out. Let
$$
n=\sum_{i=0}^\infty a_ip^i,
$$
with $a_i\in\{0,1,\ldots,p-1\}$. The upshot is that (binomial theorem!)
$$
d^{p^i}\equiv 1\pmod{p^{i+1}}
$$
for all $i$. Therefore also $x_i:=d^{a_ip^i}\equiv1\pmod{p^{i+1}}$. This implies in turn that the infinite product
$$
\prod_{i=0}^\infty x_i
$$
converges (it is clear that the sequence of partial products stabilizies modulo $p^{i+1}$ after $i$ factors). There's your definition:
$$
d^n=\lim_{k\to\infty}\prod_{i=0}^kx_i.
$$
With a little bit extra work we see that this turns $1+p\mathbb{Z}_p$ into a $\mathbb{Z}_p$-module, which comes in handy sometimes.
A: In addition to the other good answers, it is sometimes nice to realize that the usual power series for $\log(1+px)$ and $e^{px}$ converge $p$-adically for $x\in\mathbb Z_p$ and $p\not=2$.
