A while back I posted a spreadsheet for calculating sampling plans and it can determine the numbers you are looking for:
Sampling Spreadsheet to help determine the sample size for sampling plans
For 95% reliability, enter 5% in the "Unacceptable Quality Level" cell
For 95% certainty, enter 5% in the "Beta Risk" cell
Then adjust the sample size cell (or the slider) and watch the "RE" cell (the reject number). Once it changes, then you have the smallest sample needed to acheive your goals. Keep increasing the sample size and you will reach Re=1, Re=2, ... I checked a few and they agree with the numbers posted already.
Obviously, you could change the "Unacceptable Quality Level" and the "Beta Risk" for other levels. You can also "reverse engineer" the formulas to see how I got the results.