I would like to create a function that acts on whether the input is even or odd, e.g.:

In[644]:= f[a_] = If[EvenQ[a], 2 a, 3 a];
f[2]
Out[645]= 6

I've determined (I think) that this is because a is an expression and QEven returns false for expressions. How do I hold off evalution of this until input is given? I thought something like Defer would work but then it is never evaluated (see below)!

Apologies if this gets asked a lot - I assume this is a common issue, but I was unable to come up with appropriate search terms to describe it (I'm not very familiar with Mathematica terminology yet). Thanks!

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.