Your calculations have one serious flaw: you assume that a person's income is fixed over their lifetime. You assume the median man earns the median income for 45 years before retiring. In reality, young workers tend to hold the lower income jobs and over time, they migrate up the distribution. New entrants to the job market take their place. The average lifetime income of the median worker is not actually the median income at any given time.