$a^n \equiv b^n \pmod{d^n}$ for every $n \in \mathbb{N}$ implies $a = b$ Inspired by this recent question, I want to prove that if $a, b, d$ are integers such that $a$ and $b$ are coprime to $d$, $d > 1$, and $a^n \equiv b^n \pmod{d^n}$ for every $n = 1, 2, 3, \ldots$ then indeed $a = b$. I think this must be a corollary of some major result from elementary number theory, but I can't find such a result right now.
 A: A possible major result is the so-called 'Lifting The Exponent Lemma', as I wrote in my answer to that other question. It is actually a collection of lemma's. I'll restate them, as they are to be found in the above link.
We use the notation $\nu_p(n)$ for the exponent of $p$ (possibly $0$) in the prime factorization of $n$.
Theorem 1. Let $x$ and $y$ be (not necessarily positive) integers, let $n$ be a positive integer, and let $p$ be an odd prime such that $p\mid x-y$ and none of $x$ and $y$ is divisible by $p$. We have $\nu_p(x^n-y^n)=\nu_p(x-y)+\nu_p(n)$.
Theorem 2 is an analoguous form for $x^n+y^n$ and $n$ odd, which is easily deduced.
There are two results for the case $p=2$.
Theorem 3. Let $x$ and $y$ be two odd integers such that $4\mid x-y$. Then $\nu_2(x^n-y^n)=\nu_2(x-y)+\nu_2(n)$.
and
Theorem 4. Let $x$ and $y$ be two odd integers and let $n$ be an even positive integer. Then $\nu_2(x^n-y^n)=\nu_2(x^2-y^2)+\nu_2(n)-1$.
These results prove useful in various number theory problems, and they are worth being memorized.
A: From $n=1$ we have $a=b+dk$ for some integer $k$.  We now have 
$$d^n|(a^n-b^n)=(b+dk)^n-b^n$$
Hence $(\frac{b}{d}+k)^n-(\frac{b}{d})^n\in\mathbb{Z}$ for all $n\in\mathbb{N}$.  We must also have $\frac{b}{d}\notin \mathbb{Z}$ since $\gcd(b,d)=1$.  The result now follows from the question you linked.
