Read the first worked example with the solution open so the structure is clear.
Try the practice problems before revealing each solution.
Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea:A sequence assigns a term to each position 1,2,3,… by a generating rule; terms are listed, not added.
Common stuck point:The procedure for sequence is the easy part; the trap is treating a sequence as a sum. Asking "Am I listing terms by position (an) rather than adding them up?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
Sense of Study hint:Ask: Am I listing terms by position (an) rather than adding them up?
Worked Examples
Example 1
easy
Write the first five terms of the sequence an=n+1n for n=1,2,3,…
Answer
21,32,43,54,65
First step
1
a1=21.
Full solution
2
a2=32.
3
a3=43.
4
a4=54.
5
a5=65.
Each term is found by substituting n into the formula. The terms increase and approach 1, illustrating that this sequence converges to 1 as n→∞.
Example 2
medium
Determine whether the sequence an=n2+23n2+1 converges or diverges. If it converges, find the limit.
Example 3
easy
Show step-by-step output for: n=2; n=n∗3; n=n+1; OUTPUT n.
Example 4
medium
A recipe lists: (1) bake 30 min, (2) preheat oven, (3) mix batter. Why is order (2),(3),(1) correct rather than (1),(2),(3)?
Example 5
medium
A program reads two numbers, prints their sum, then their product. Write the sequence of 4 steps in plain pseudocode order.
Example 6
hard
A deploy script runs: build, run tests, push to prod. A junior reorders to: push, build, test. List 2 concrete failure modes.
Example 7
challenge
Given 4 statements S1..S4 where S3 depends on S1 and S4 depends on S2, how many valid total orderings exist?
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easy
Write the first four terms of bn=(−1)n⋅n1.
Example 2
medium
Determine whether an=n!2n converges or diverges.
Example 3
easy
Is 3,7,11,15,… a sequence or a series?
Example 4
easy
Find the 4th term of the sequence an=2n+1.
Example 5
easy
List the first three terms of an=n2.
Example 6
easy
What is the next term in 5,10,20,40,…?
Example 7
easy
Does the sequence an=1−n1 increase or decrease as n grows?
Example 8
easy
Write the general term for 3,5,7,9,… starting at n=1.
Example 9
easy
In the sequence an=n+1n, which term equals 54?
Example 10
easy
Is 2,2,2,2,… a valid sequence? What is its limit?
Example 11
medium
A sequence is defined recursively by a1=3, an+1=an+4. Find a5.
Example 12
medium
The general term is an=3n+22n−1. What value do the terms approach as n→∞?
Example 13
medium
Find a formula for the nth term of 1,4,9,16,25,… and use it to find the 8th term.
Example 14
medium
The sequence an=(−1)n gives −1,1,−1,1,…. Does it converge?
Example 15
medium
Given an=an−1⋅21 with a1=16, find a4 and describe long-term behavior.
Example 16
medium
For the sequence an=2n+1, what is the difference an+1−an?
Example 17
challenge
A sequence satisfies a1=1 and an+1=an+1an+2. Show its terms approach 2.
Example 18
challenge
The Fibonacci sequence is 1,1,2,3,5,8,… with Fn+1=Fn+Fn−1. Show FnFn+1 approaches 21+5.
Example 19
challenge
Prove the sequence an=n2+23n2+1 is bounded above by 3 and find its limit.
Example 20
medium
Find the 10th term of the sequence defined by an=3⋅2n−1.
Example 21
medium
A sequence has an=n2+1n2. Is it increasing, and what is its limit?
Example 22
medium
Find the general term of 2,6,12,20,30,… (hint: products of consecutive integers).
Example 23
easy
Trace: x=7; y=x−2; z=y+1. What is z?
Example 24
easy
Trace: a=4; b=a+a; c=b+a. What is c?
Example 25
easy
Order the steps to send an email: (1) Click Send, (2) Type message, (3) Open email app, (4) Enter recipient. Give the correct order.
Example 26
easy
Trace: p=3; q=p; p=p+10. What is q?
Example 27
easy
Trace: s = ''; s=s+′g′; s=s+′o′. What is s?
Example 28
medium
Trace: x=10; y=x/2; x=x−y; OUTPUT x.
Example 29
medium
Order so that account balance prints correctly: (1) print balance, (2) deposit = 50, (3) balance = balance + deposit, (4) balance = 100. Give the order.
Example 30
medium
Trace: a=6; b=4; a=a+b; b=a−b; OUTPUT a, b.
Example 31
medium
Trace: m=12; m=m%5; m=m∗4; OUTPUT m.
Example 32
medium
Trace: L=[1,2]; L.append(3); L.append(L[0]); OUTPUT L.
Example 33
medium
Trace: a=2; b=a∗a; c=b∗a; d=c+b+a; OUTPUT d.
Example 34
medium
Trace: x=5; y=10; swap (no temp): x=x+y; y=x−y; x=x−y. Final x,y?