# Math: How Do I Find The Pattern's Rule?

**URL:** <https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903>\
**Category:** Factual Questions\
**Created:** [September 10, 2004, 11:49am UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903 "2004-09-10T11:49:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jinx](https://boards.straightdope.com/u/Jinx)\
**Post date:** [September 10, 2004, 11:49am UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/1 "2004-09-10T11:49:37Z")

</div>

I can’t recall how to find the general rule when given the following set of numbers:  
0, 3, 10, 21, 36…

Or, in a table:  
for n=1, the result = 0  
for n=2, the result = 3  
for n=3, the result = 10  
for n=4, the result = 21  
for n=5, the result = 36

First, I found the first difference between all consecutive values which varies as:  
for n=1, result = n/a  
for n=2, result = 3  
for n=3, result = 7  
for n=4, result = 11  
for n=5, result = 15

Then, I found the second difference (delta between the first differences), and we find a constant of k=4

Because it took two steps to get a constant delta, we know the general pattern is an^2 + bn + c…but I can’t solve it! Does anyone recall how to do this? One example in a geometry book suggests to notice that the results follow the following pattern: 1_3, 2_5, 3_7, 4_9… so the pattern is something like n(n^2 + c)…but I still can’t get it to work.

Last, what kind of series or progression is this?

- Jinx

---

<div class="post-metadata">

**Author:** ![Complex\_Conjugate](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Complex\_Conjugate](https://boards.straightdope.com/u/Complex_Conjugate)\
**Post date:** [September 10, 2004, 11:57am UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/2 "2004-09-10T11:57:13Z")

</div>

2n[sup]2[/sup] - 3n + 1

---

<div class="post-metadata">

**Author:** ![Jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jinx](https://boards.straightdope.com/u/Jinx)\
**Post date:** [September 10, 2004, 12:03pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/3 "2004-09-10T12:03:35Z")

</div>

> [@Complex Conjugate](#):
>
> 2n[sup]2[/sup] - 3n + 1

OK, that’s helpful. Now, can you explain how you found this solution? We’d like to learn a little if it’s not asking too much! - Jinx

---

<div class="post-metadata">

**Author:** ![Complex\_Conjugate](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Complex\_Conjugate](https://boards.straightdope.com/u/Complex_Conjugate)\
**Post date:** [September 10, 2004, 12:20pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/4 "2004-09-10T12:20:01Z")

</div>

You already have your answer:  
(0_1), (1_3), (2_5), (3_7), (4\*9), ((n-1)(2n-1))

---

<div class="post-metadata">

**Author:** ![Jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jinx](https://boards.straightdope.com/u/Jinx)\
**Post date:** [September 10, 2004, 12:28pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/5 "2004-09-10T12:28:24Z")

</div>

> [@Complex Conjugate](#):
>
> You already have your answer:  
> (0_1), (1_3), (2_5), (3_7), (4\*9), ((n-1)(2n-1))

I guess…but really it seems like, once you get to this step, you’re mentally asking yourself the difference between “n” and each factor. How would you explain the general technique to a high schooler…lucky guessing until it works? - Jinx

---

<div class="post-metadata">

**Author:** ![Jinx](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Jinx](https://boards.straightdope.com/u/Jinx)\
**Post date:** [September 10, 2004, 12:30pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/6 "2004-09-10T12:30:30Z")

</div>

Oops! The previous heading was typed in haste. Yes, I see it works for all terms in the sequence. Thanks for your help… - Jinx

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [September 10, 2004, 12:52pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/7 "2004-09-10T12:52:35Z")

</div>

First off, this sort of sequence would generally be referred to as a quadratic sequence.

As far as a general method for solving it, once you know that it follows the pattern s(n) = a(n^2) + bn + c, you can use any three elements of the sequence (such as the first three) to solve for a, b, and c, just like any other time you’re solving a system of three equations in three unknowns. To run through one such solution quickly:

for n = 1:  
(1) a + b + c = 0

for n = 2:  
(2) 4a + 2b + c = 3

Subtracting (1) from (2):  
(3) 3a + b = 3

for n = 3:  
(4) 9a + 3b + c = 10

Subtracting (1) from (4):  
(5) 8a + 2b = 10

Multiplying (4) by a factor of 2:  
(6) 6a + 2b = 6

Subtracting (6) from (5):  
(7) 2a = 4, which is easily solved as a = 2

Substituting the new value of a into (6):  
(8) 12 + 2b = 6, which is solved as b = -3

Substituting the values of a and b into (1):  
(9) 2 - 3 + c = 0, which is solved as c = 1

Therefore the general equation is 2(n^2) -3n + 1

Hope that helps.

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [September 10, 2004, 1:03pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/8 "2004-09-10T13:03:16Z")

</div>

There’s another explanation of the series, which gives the same results as earlier posters. It’s every other member of the series of triangular numbers:  
0, [1], 3, [6], 10, [15], 21, [28], 36, [45], …

The differences between members of this series are just the natural numbers:  
1, 2, 3, 4, 5, 6, 7, 8, 9, …

Note that if you add these in pairs, you get the differences in the original series:  
1+2=3, 3+4=7, 5+6=11, 7+8=15, …

The usual formula for the triangular numbers is:  
n(n-1)/2

If you add any two consecutive members of the series, you get a square, e.g.  
28+36 = 64 = 8 squared

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [September 10, 2004, 1:47pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/9 "2004-09-10T13:47:30Z")

</div>

It looks like the OP’s question is a problem in “the calculus of finite differences.” For a good short introduction, see Chapter 2 of Martin Gardner’s _Colossal Book of Mathematics_.

---

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://boards.straightdope.com/u/chrisk)\
**Post date:** [September 10, 2004, 2:22pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/10 "2004-09-10T14:22:15Z")

</div>

Minor problem with my solution… the explanation for equation (6) should read:

Multiplying ( **3** ) by a factor of 2:

Makes a bit more sense that way. 😃 (Do I get any marks taken off for that mistake? :smack: )

---

<div class="post-metadata">

**Author:** ![Mathochist](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Mathochist](https://boards.straightdope.com/u/Mathochist)\
**Post date:** [September 10, 2004, 7:45pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/11 "2004-09-10T19:45:14Z")

</div>

> [@Jinx](#):
>
> Because it took two steps to get a constant delta, we know the general pattern is an^2 + bn + c…but I can’t solve it!

Plug in n=1 and n=2, and n=3 to get linear equations for a, b, and c

> [@](#):
>
> what kind of series or progression is this?

Nothing special. Just the evaluations of a polynomial at the sequence of positive integers.

---

<div class="post-metadata">

**Author:** ![Mathochist](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Mathochist](https://boards.straightdope.com/u/Mathochist)\
**Post date:** [September 10, 2004, 7:49pm UTC](https://boards.straightdope.com/t/math-how-do-i-find-the-patterns-rule/263903/12 "2004-09-10T19:49:38Z")

</div>

Another solution: [look it up](http://www.research.att.com/~njas/sequences/).
