Minimal free resolutions for homogeneous ideals with Betti numbers 1, n, n,1