In case of a power failure, an application error, or other unexpected failure, the system cannot recycle numbers automatically for continuous number sequences. You can run the cleanup process manually or automatically to recover the lost numbers.
Take a look at this article that describes how to recover missing purchase orders number with the cleanup functionality : http://d365tour.com/issues/issue-missing-number-increment-within-a-continuous-number-sequence/
Carefully consider server usage when you plan the cleanup process. We recommend that you perform the cleanup as a batch job during non-peak hours.