I’m stuck on a basic thing with arithmetic sequences. I know the nth-term formula a_n = a_1 + (n−1)d, but I keep getting confused about how to use it to test whether a specific number is actually in the sequence and, if it is, which term it is. I mix up the n vs (n−1) part, and I’m not sure what changes (if anything) when the common difference is negative or the sequence is written in descending order.
For example, if the first term is 19 and the common difference is −4, is 3 one of the terms? And if the first term is 2 with difference 5, is 47 a term, and which term would that be? I want a reliable, step-by-step way to check membership and get the index without trial-and-error or off-by-one mistakes. Also, how should I think about cases where a “last term” is stated but the step might skip over it so it isn’t actually included?
One more thing: when I’m given two non-consecutive terms (like “the 4th term is 13 and the 17th term is 52”), I’m not confident about setting it up to solve for the common difference and first term without misplacing the (n−1). Could someone explain the clean setup for that too?
Thanks – I’m trying to understand the reasoning clearly rather than just memorizing steps.
















3 Responses
Use x = a1 + (n−1)d ⇒ n = (x − a1)/d + 1 and check that n is a positive integer (works even when d < 0): for a1=19, d=−4, x=3 gives n=5 (yes); for a1=2, d=5, x=47 gives n=10; if a last term L is given, compute N = (L − a1)/d + 1 must be a positive integer and 1 ≤ n ≤ N, and with two terms a_k, a_m use d = (a_m − a_k)/(m − k) then a1 = a_k − (k−1)d. Good reference: https://www.khanacademy.org/math/algebra/sequences/alg-arithmetic-sequences/a/arithmetic-sequences-review – want me to walk through a “last term gets skipped” case or check one of your own?
Ooh, arithmetic sequences are like linear functions wearing a disguise! Once you see that, the n vs (n−1) puzzle calms down nicely. Here’s a clean, reliable way to think about it.
Big idea: count “steps from the start.”
– Let s be the number of steps you take from the first term to reach a target term. Then s = n − 1.
– The nth term is a_n = a_1 + s·d with s = n − 1.
– So to check if a value x is in the sequence, solve x = a_1 + s·d. That gives s = (x − a_1)/d.
– If s is a nonnegative integer, then x is in the sequence and its index is n = s + 1.
That’s the whole membership test and index in one shot. No off-by-one errors, because we do all the thinking in “steps” and only at the very end convert back to n by adding 1.
Recipe for infinite arithmetic sequences (works whether d is positive or negative)
1) Compute s = (x − a_1)/d.
2) Check two things:
– s is an integer (equivalently, d divides x − a_1; you can use |d| for the divisibility check).
– s ≥ 0 (so n = s + 1 ≥ 1).
3) If both pass, then x is the nth term with n = s + 1. Otherwise, x is not in the sequence.
Examples you asked about
– a_1 = 19, d = −4, check x = 3:
s = (3 − 19)/(−4) = (−16)/(−4) = 4, which is a nonnegative integer.
So x is in the sequence, and n = s + 1 = 5. Indeed: 19, 15, 11, 7, 3.
– a_1 = 2, d = 5, check x = 47:
s = (47 − 2)/5 = 45/5 = 9.
n = s + 1 = 10, so 47 is the 10th term.
Direction and negative d
– You don’t have to change the formula when d is negative or the sequence is descending. The same test works. The only extra common-sense check is that s must be ≥ 0 so you’re not “before” the first term.
Finite sequences with a stated “last term”
Sometimes you’ll see something like “start at a_1, step by d, and go until you reach or pass L.” In that situation:
– First check if L itself is actually a term. Compute N = 1 + (L − a_1)/d. If N is a positive integer, then L is included and there are exactly N terms.
– If N is not an integer, L isn’t a term. The list stops with the last term you hit before you’d pass L in the stepping direction.
– If d > 0: the last included term is a_1 + floor((L − a_1)/d)·d.
– If d < 0: the last included term is a_1 + ceil((L − a_1)/d)·d. - Membership inside such a finite list: do the same s-test as above, but also ensure you haven’t gone past the end. Concretely: - If d > 0, require a_1 ≤ x ≤ L.
– If d < 0, require L ≤ x ≤ a_1. And of course s must be an integer ≥ 0. A quick failure example: a_1 = 7, d = 6, “up to 40.” - (40 − 7)/6 = 33/6 = 5.5, not an integer, so 40 is not included. - The last actual term is 7 + floor(33/6)·6 = 7 + 5·6 = 37. Given two non-consecutive terms Suppose you’re told “the rth term is A and the sth term is B” with r < s. The clean setup uses subtraction to eliminate a_1: - a_r = a_1 + (r − 1)d - a_s = a_1 + (s − 1)d Subtract: a_s − a_r = (s − r)d, so - d = (B − A)/(s − r) Then plug back to get a_1: - a_1 = A − (r − 1)d Your example: 4th term is 13 and 17th term is 52. - d = (52 − 13)/(17 − 4) = 39/13 = 3 - a_1 = 13 − (4 − 1)·3 = 13 − 9 = 4 So the sequence is a_n = 4 + (n − 1)·3. Nerdy but super-helpful viewpoint (why this all feels linear) If you write a_n as a line in n, you get a_n = d·n + b where b = a_1 − d. Then: - Slope = d, just like a line. - Given two terms (r, A) and (s, B), the slope is d = (B − A)/(s − r), and b = A − d·r. - Using any known term a_k as a “base,” you can write a_n = a_k + (n − k)d. This is a great way to avoid n − 1 mix-ups: pick a convenient k and count steps from there. Edge case note: d = 0 If d = 0, every term equals a_1. Membership is simply “x = a_1,” and every n works if it’s infinite; for a finite list, any given last term must also equal a_1. Mini-summary you can memorize - Membership and index: s = (x − a_1)/d, need s ∈ {0,1,2,…}; then n = s + 1. - Finite “up to L”: also check you haven’t passed L in the stepping direction; L is included only if (L − a_1)/d is an integer. - Two-term data: d = (B − A)/(s − r), a_1 = A − (r − 1)d (or use the linear form a_n = d·n + b). Follow-up question to play with Try this: The 5th term of an arithmetic sequence is 21 and the 20th term is −9. - What are a_1 and d? - Is 0 a term? If yes, which term is it? I’m curious to see what method you use first-steps-from-a-known-term or the line-slope approach!
Picture the sequence as evenly spaced stepping stones: a number x is on a stone exactly when n = 1 + (x − a1)/d is a positive integer (same idea checks a “last term” L by seeing (L − a1)/d is a nonnegative integer), and with two known stones a_k, a_m you get d = (a_m − a_k)/(m − k) and a1 = a_k − (k−1)d.
Examples: 19,15,11,7,3,… gives n=1+(3−19)/−4=5 (so 3 is the 5th); starting at 2 with d=5 gives n=1+(47−2)/5=10 (47 is the 10th); if a4=13 and a17=52 then d=3 and a1=4.