Practice Sequence in Math

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

An ordered list of numbers generated by a rule, where each number has a specific position (first, second, third,...).

A pattern of numbers: first term, second term, third term, and so on.

Showing a random 20 of 50 problems.

Example 1

easy
What is the next term in 5,10,20,40,โ€ฆ5, 10, 20, 40, \ldots?

Example 2

challenge
Trace: a=1a=1; b=ab=a; a=a+ba=a+b; b=a+bb=a+b; a=a+ba=a+b; OUTPUT aa.

Example 3

medium
Find a formula for the nnth term of 1,4,9,16,25,โ€ฆ1, 4, 9, 16, 25, \ldots and use it to find the 8th term.

Example 4

medium
Determine whether an=2nn!a_n = \frac{2^n}{n!} converges or diverges.

Example 5

easy
Find the 4th term of the sequence an=2n+1a_n=2n+1.

Example 6

medium
If you reorder `open file; read file; close file` to `read; open; close`, what happens at runtime?

Example 7

medium
Trace: count=0count=0; count=count+1count=count+1; count=countโˆ—2count=count*2; count=count+1count=count+1; OUTPUT countcount.

Example 8

medium
Determine whether the sequence an=3n2+1n2+2a_n = \frac{3n^2 + 1}{n^2 + 2} converges or diverges. If it converges, find the limit.

Example 9

medium
For the sequence an=2n+1a_n=2n+1, what is the difference an+1โˆ’ana_{n+1}-a_n?

Example 10

medium
The sequence an=(โˆ’1)na_n=(-1)^n gives โˆ’1,1,โˆ’1,1,โ€ฆ-1,1,-1,1,\ldots. Does it converge?

Example 11

hard
A statement using zz appears at line 3; zz is assigned at line 7. Will the program work as written? Why or why not?

Example 12

hard
Trace: a=1a=1; b=2b=2; c=3c=3; a=ba=b; b=cb=c; c=ac=a. Final a,b,ca,b,c?

Example 13

easy
Is 3,7,11,15,โ€ฆ3, 7, 11, 15, \ldots a sequence or a series?

Example 14

medium
Trace: x=5x=5; y=10y=10; swap (no temp): x=x+yx=x+y; y=xโˆ’yy=x-y; x=xโˆ’yx=x-y. Final x,yx,y?

Example 15

medium
Trace: a=2a=2; b=aโˆ—ab=a*a; c=bโˆ—ac=b*a; d=c+b+ad=c+b+a; OUTPUT dd.

Example 16

medium
A program reads two numbers, prints their sum, then their product. Write the sequence of 4 steps in plain pseudocode order.

Example 17

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 18

challenge
The Fibonacci sequence is 1,1,2,3,5,8,โ€ฆ1,1,2,3,5,8,\ldots with Fn+1=Fn+Fnโˆ’1F_{n+1}=F_n+F_{n-1}. Show Fn+1Fn\frac{F_{n+1}}{F_n} approaches 1+52\frac{1+\sqrt5}{2}.

Example 19

easy
Is 2,2,2,2,โ€ฆ2, 2, 2, 2, \ldots a valid sequence? What is its limit?

Example 20

easy
Trace: a=4a=4; b=a+ab=a+a; c=b+ac=b+a. What is cc?