We study systems of few two-component fermions interacting via short-range interactions within a harmonic-oscillator trap. The dominant interactions, which are two-body interactions, are organized according to the number of derivatives and defined in a two-body truncated model space made from a bound-state basis. Leading-order (LO) interactions are solved for exactly using the formalism of the no-core shell model, whereas corrections are treated as many-body perturbations. We show explicitly that next-to-LO and next-to-next-to-LO interactions improve convergence as the model space increases. We present results at unitarity for three- and four-fermion systems, which show excellent agreement with the exact solution (for the three-body problem) and results obtained by other methods (in the four-body case). We also present results for finite scattering lengths and nonzero range of the interaction, including (at positive scattering length) observation of a change in the structure of the three-body ground state and extraction of the atom-dimer scattering length. © 2010 The American Physical Society.