Reconstruction of f (R) models with scale-invariant power spectrum