Probably your application tried to get the number from the sequence and cancelled the transaction before commit. In this case, the sequence # incremented anyway.