  In an $n$-dimensional Friedmann-Robertson-Walker metric, it is rigorously
shown that any analytical theory of gravity $f(R,{\cal G})$, where $R$ is the
curvature scalar and $\cal G$ is the Gauss-Bonnet topological invariant, can be
associated to a perfect-fluid stress-energy tensor. In this perspective, dark
components of the cosmological Hubble flow can be geometrically interpreted.
