Let the sequence {an} be defined so that a1 = 1 and each succeeding term is found by adding 3 to the one before it. Find the formula representing an, the nth term of the sequence.