Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me