n = (t/d)2 p(1-p) / ( 1 + ( (t/d)2p(1-p) - 1 )/N )