We show that an n-dimensional generalized Robertson-Walker (GRW) space-time with divergence-free conformal curvature tensor exhibits a perfect fluid stress-energy tensor for any f(R) gravity model. Furthermore we prove that a conformally flat GRW space-time is still a perfect fluid in both f(R) and quadratic gravity where other curvature invariants are considered.
@article{arxiv.1810.03204,
title = {Cosmological perfect-fluids in f(R) gravity},
author = {Salvatore Capozziello and Carlo Alberto Mantica and Luca Guido Molinari},
journal= {arXiv preprint arXiv:1810.03204},
year = {2018}
}