n should be a float to avoid sleep(0) (in the case of n<3)