differentiate finite sequence from infinite