Curves in low dimensional projective spaces with the lowest ranks