We present a realistic numerical simulation of a source of number-squeezed photon states employing a cavity-based parametric downconversion (PDC) process. A cavity containing the PDC medium is pumped repeatedly. The cavity recycles only one of the PDC output modes, allowing it to be amplified with each subsequent pump pulse. A photon number resolved (PNR) measurement is made on the other PDC output mode following each pump pulse. Once the PNR measurements indicate that the target number of photons has accumulated in the cavity, the pumping is stopped and the resulting photon state is released. The photon number uncertainty in the resulting state is similar to 3 dB below that of a mean-equivalent coherent state and furthermore the probability of generating the target photon number is similarly increased. (C) 2014 Optical Society of America