RPA description of the ground state of 12C, 16O, 40Ca and 208Pb