Determining $\bf g$ and potential $\phi$ of a planet of an infinite number of stratified spherical shells. 
A planet has radius $1$ and is composed of an infinite number of
  stratified spherical shells $S_n$ labelled by integers $n>1$. The
  shell $S_n$ has uniform density $2^{n−1}\rho_0$, where $\rho_0$ is a
  constant, and occupies the volume between radius $2^{−n+1}$ and
  $2^{−n}$.
Obtain an expression for the gravitational field $\bf g$ due to the
  planet at a distance $2^{-N}$ where $N \ge 1$.
What is the potential $\phi(r)$ due to the planet at $r>1$?

$\bf g=-\nabla\phi$ and $\nabla^2\phi=4\pi G \rho$
I think I can do the first part by Gauss' law $$\int_S{\bf {g}}\cdot {\bf{dS}} =-4\pi GM$$
For the second part I'm not sure what the approach should be. I was thinking solving the spherically symmetric problem $$\nabla^2\phi=0$$ (as $\rho=0$ for $r>1$) which has solution $$\phi=\frac Ar+B$$ and we can see that $B=0$ as $\phi\rightarrow 0$ as $r\rightarrow \infty$. 
But I am unsure how to determine $A$.
Could I just use a similar approach to the first part to find $\bf g$ for $r>1$ and then use $\bf g=-\nabla\phi$ to find $A$?
Will this work and is there a better way?
Any help is appreciated, thanks
 A: For the first part, your method using Gauss' law is fine. Note that the gravitational field $\vec g$ depends on the radius $r$ at which it is measured! Indeed,
$$ \oint_{S_r} \vec g . d \vec S = 4\pi G \int_{B_r} \rho dV,$$
where $S_r$ denotes the sphere of radius $r$ and $B_r$ denotes the spherical ball of radius $r$. To spell it out further:
$$ 4\pi r^2 g(r) = 4 \pi G \int_0^r \rho(\widetilde r) 4\pi \widetilde r^2 d \widetilde r $$
For the second part, you're right that $\phi$ obeys $\nabla^2 \phi = 0$  when $r > 1$. You're also right that $\phi(r) = A/r $ is the general spherically-symmetric solution to $\nabla^2 \phi = 0$ with $ \lim_{r \to \infty} \phi(r) = 0$.
To get the value of $A$, you can use the gradient theorem for line integrals:
$$ \phi(\infty) - \phi(r) = \int_{L_r} \nabla \phi . d \vec x,$$
where $L_r$ denotes the radial line segment from your chosen point at radius $r$ to the "point at infinity".
But $\nabla \phi = - \vec g = - g(r) \vec e_r$, so this reduces to
$$ \phi(r) =  \int_r^\infty g(\widetilde r) d\widetilde r.$$
Hopefully you can finish off from here.
