# $(A_f)_{g/f^{n_0}}\cong A_{fg}$ (localization with the powers of an element)

I'm working in a problem from Hartshorne Algebraic Geometry. But I need a result from Commutative Algebra.

Given a commutative ring $B$ with $1$. For each $b \in B$ define the ring $B_b$ as the localizated ring by the multiplicative set $\{b^n:n\ge 1 \}$.

Given a commutative ring $A$ and elements $f,g \in A$ and some $n_0 \in \mathbb{N}$ I want to know if it's true that $(A_f)_{g/f^{n_0}}\cong A_{fg}$.

I tried to construct an isomorphism but I could not )= If this result is true, and I have an explicit isomorphism, then I'll be able to prove that $(X_f,O_X|_{X_f})\cong (Spec(A_f),O_{Spec(A_f)})$ as locally ringed spaces.

But I need to prove the above result. Thanks

Note that $A_{fg}\cong (A_f)_g$. This can be proven by showing that both $A\rightarrow A_{fg}$ and $A\rightarrow A_f \rightarrow (A_f)_g$ are the universal localisation maps wrt $fg$.
Then you need to show that $(A_f)_{g/f^{n_0}}\cong (A_f)_g$ for any $n_0$. This can be done with the same reasoning on the maps $A_f \rightarrow(A_f)_{g/f^{n_0}}$ and $A_f \rightarrow(A_f)_g$.