  We discuss a modified form of gravity implying that the action contains a
power \alpha of the scalar curvature. Coupling with the cosmic fluid is
assumed. As equation of state for the fluid, we take the simplest version where
the pressure is proportional to the density. Based upon a natural ansatz for
the time variation of the scale factor, we show that the equations of motion
are satisfied for general \alpha. Also the condition of conservation of energy
and momentum is satisfied. Moreover, we investigate the case where the fluid is
allowed to possess a bulk viscosity, and find the noteworthy fact that
consistency of the formalism requires the bulk viscosity to be proportional to
the power (2\alpha -1) of the scalar expansion. In Einstein's gravity, where
\alpha=1, this means that the bulk viscosity is proportional to the scalar
expansion. This mathematical result is of physical interest; as discussed
recently by the present authors, there exists in principle a viscosity-driven
transition of the fluid from the quintessence region into the phantom region,
implying a future Big Rip singularity.
