Well the limits are the same for both 401s and 457s so my previous googling did not give any indication as to which applied. However, I have had a chance to loook through the IRS code, and the answer is in S7701, where paragraph (f) provides:
Well I know that technically it is probably not a 401(k), 403(b) or 457(b), but if one leaves the federal govt part way through the year and joins an employer with a 401, may one contribute the maximum to the TSP and the maximum to the 401?