Your code displays on each line values from i (which increases by 1 each new line) to i+j. But you want each line to begin with the last number displayed, plus one.

So how about a counter that just increases each time you print something? Then print the counter instead of trying to calculate something from i and j.