Agree with those that say it comes from mathematics, and want to add that 'i' derives from index, not integer or iterator.