Proofs of $P^{\#P}\subseteq P^{PP}$ and $\#P\subseteq FP^{PP}$
This is not the full proof but the complete idea:
Let Turing machine $M$, define  $L_M$  be the language defined as  $L_M = \{ ((x, y) \in \Sigma^*\times \mathbb{N}  ~|~ \#\text{accepting path of } {M}(x) &gt; y \} $
Then prove that $L_M\in PP$.
Now use the binary search technique to compute the function g(x) in $\#P$ using $L_M$.
And other way around its easy by using $\#P$ function TM you can always answer whether no. of accepting paths are more $\frac{1}{2}$ or not.
Let $L\in P^{\#p}$, then there is a deterministic oracle Turing machine $M'$ that runs polynomial time, and a function $g\in \#p$
such that  $L= M'^{g}$. Let $M$ be a poly time Turing machine that uses at most $poly(n)$ non-deterministic steps such that $g(x)=\# acceptig pathof M"(x)$.   Use the standard binary search technique to show that  $g(x)$ can be computed  using $O(n)$ many queries to the language $L_M$.
$x$, oracle access to $L_M$ and output $g(x)$.

Initialize $p=|x|$, $y=2^p$.

Repeat steps 3 &amp; 4 until $p\ge 0$

Query $(x,y)$ to the oracle;  If YES, then set $y=y+2^{p+1}$;
Else
break .

Set $p=p-1$


Now we know the range for g which is $2^{p-1}&lt;g&lt;2^{p}$
$use binary search technique in this range and since there can be exponential terms hence binary search technique will take O(|x|) time.
Clearly, the algorithm  above runs in time ${\sf poly}(n)$, and hence computing $g$ can be done in $poly$ with oracle access to $L_M\in PP$.