Atomic and ionic energy expressions obtained by scaling both the nuclear and electronic charges