  We analyze the structure of a particular higher derivative correction of
five-dimensional ungauged and gauged supergravity with eight supercharges.
Specifically, we determine all the purely bosonic terms which are connected by
the supersymmetry transformation to the mixed gauge-gravitational Chern-Simons
term, W wedge tr R wedge R. Our construction utilizes the superconformal
formulation of supergravity.
  As an application, we determine the condition for the supersymmetric anti-de
Sitter vacuum with this term. We check that it gives precisely the same
condition as the a-maximization in four-dimensional superconformal field theory
on the boundary, as predicted by the AdS/CFT correspondence.
