The reaction that will prepare both of these functional groups at the same time is the PCC oxidation of 1,3-dihydroxybutane.

Write out this reaction. J