t+dt is limited to the number of timesteps, not to timesteps-1
Number of initial times is nb of timesteps minus dt
rewritting of main algo by Vincent Dahirel to speed up. Also more readable