HexMathv1.0.4

Sequence calculator: finding the pattern

This sequence calculator finds the pattern in a list of numbers. Type the first few terms or scan them. HexMath tests for an arithmetic, geometric or quadratic pattern, returns the rule for the nth term or the term you ask for, and shows the differences or ratios that reveal the pattern, step by step.

Loading math input...

What this page covers

  • Arithmetic patterns, where the same number is added each time.
  • Geometric patterns, where each term is multiplied by the same number.
  • Quadratic patterns, where the differences themselves go up by a fixed amount.
  • Not covered here: sums of many terms (see the partial sum calculator), and lists with no clear rule, where several patterns fit the same terms.

How to enter the problem

  • Type it or paste it. List at least 4 terms separated by commas and say what you want, the nth term or a term number.
  • Scan it. Fit the one problem in the frame.
  • Choose a photo. Several problems in one photo are solved as a list.
  • Then tap Solve.

Worked examples

Example 1: Find the nth term of 7, 11, 15, 19, …

Problem

Find the n\displaystyle nth term of 7,11,15,19,…\displaystyle 7, 11, 15, 19, \dots

Answer

Verified

The answer is

an=4n+3a_n = 4n + 3

Explanation

  1. Find the common difference
    11−7=411 - 7 = 4, 15−11=415 - 11 = 4, 19−15=419 - 15 = 4. The sequence is arithmetic with d=4d = 4.
  2. Use the arithmetic formula
    an=a1+(n−1)d=7+4(n−1)a_n = a_1 + (n - 1)d = 7 + 4(n - 1)
  3. Simplify
    7+4n−4=4n+37 + 4n - 4 = 4n + 3
  4. Check two terms
    n=1n = 1: 4+3=74 + 3 = 7. n=4n = 4: 16+3=1916 + 3 = 19. Both match.

Example 2: Find the rule for the nth term of 2, 6, 18, 54, …

Problem

Find the rule for the nth term of 2,6,18,54,…\displaystyle 2, 6, 18, 54, \dots

Answer

Verified

The answer is

an=2⋅3n−1a_n = 2 \cdot 3^{n-1}

Explanation

  1. Look at the ratios
    6÷2=36 \div 2 = 3, 18÷6=318 \div 6 = 3, 54÷18=354 \div 18 = 3. Each term is 3 times the one before.
  2. Write the geometric rule
    First term 22, ratio 33, so an=2⋅3n−1a_n = 2 \cdot 3^{n-1}.
  3. Test it
    n=4n = 4 gives 2⋅27=542 \cdot 27 = 54, which matches.

Example 3: Find the rule for the nth term of 3, 6, 11, 18, 27, …

Problem

Find the rule for the nth term of 3,6,11,18,27,…\displaystyle 3, 6, 11, 18, 27, \dots

Answer

Verified

The answer is

an=n2+2a_n = n^2 + 2

Explanation

  1. First differences
    3,5,7,93, 5, 7, 9. These are not constant.
  2. Second differences
    2,2,22, 2, 2. A constant second difference means the rule is quadratic, with n2n^2 coefficient 2÷2=12 \div 2 = 1.
  3. Remove the n2n^2 part
    Subtract n2n^2 from each term: 3−1,6−4,11−9,…3 - 1, 6 - 4, 11 - 9, \dots gives 2,2,2,…2, 2, 2, \dots
  4. Put the parts together
    What remains is the constant 22, so an=n2+2a_n = n^2 + 2.

Common mistakes

  • Using nn in place of n−1n - 1 in the arithmetic rule, which gives 4n+74n + 7 instead of 4n+34n + 3 for the example.
  • Calling a pattern arithmetic when the differences change. Check two or three differences before writing a rule.
  • Writing a geometric rule with exponent nn instead of n−1n - 1, which makes every term 3 times too big in 2,6,18,542, 6, 18, 54.
  • Stopping at the first differences for a quadratic pattern. The second differences show the n2n^2 part.

Checks, assumptions and limits

  • Check by hand: put n=1,2,3n = 1, 2, 3 into the rule and make sure it gives back the terms you started with.
  • A few terms never prove a pattern. The rule found is the simplest one that fits the terms given.
  • HexMath can make mistakes. Double check important steps.

Frequently asked questions

4 or more is safest. Two or three terms fit many different rules, so more terms make the pattern clear.

Yes. Ask for the next term, or for a term number such as the 20th, and the steps show the rule first.

The steps look at differences and ratios. If the second differences are constant, the rule is quadratic and is found the same way.

Sums have their own page. Use the partial sum calculator to add the first terms of a sequence.

Ready to solve your next math problem?

Create a free account for 3 math questions a day in your browser. No card.

Get HexMath on your phone

The same solver and camera scan on iPhone and Android.

Last updated: · HexMath