# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
63 lines (59 sloc) 3.62 KB
 Arithmetic sequences 2
randRangeNonZero(-10, 10) randFromArray([-1, 1]) * randRange(2, 6) randRange(2, 20)

The arithmetic sequence (a_i) is defined by the formula:

a_i = A + D(i - 1)

What is a_{N}, the ordinalThrough20(N) term in the sequence?

A + D * (N - 1)

From the given formula, we can see that the first term of the sequence is A and the common difference is D.

The second term is simply the first term plus the common difference.

Therefore, the second term is equal to a_2 = A + D = A + D.

To find a_{N}, we can simply substitute i = N into the given formula.

Therefore, the ordinalThrough20(N) term is equal to a_{N} = A + D (N - 1) = A + D * (N - 1).

a_1 = A
a_i = a_{i-1} + D

From the given formula, we can see that the first term of the sequence is A and the common difference is D.

The second term is simply the first term plus the common difference.

Therefore, the second term is equal to a_2 = a_1 + D = A + D = A + D.

To find the ordinalThrough20(N) term, we can rewrite the given recurrence as an explicit formula.

The general form for an arithmetic sequence is a_i = a_1 + d(i - 1). In this case, we have a_i = A + D(i - 1).

To find a_{N}, we can simply substitute i = N into the our formula.

Therefore, the ordinalThrough20(N) term is equal to a_{N} = A + D (N - 1) = A + D * (N - 1).