Nth term of an arithmetic progression