In a quadratic sequence we'll get a linear first difference and a constant second difference. Let's verify that.
n 1 2 3 4
f(n) 19 15 9 1
1st diff -4 -6 -8
2nd diff 2 2
We see that we got a constant second difference. We could just extend that and work back up to get more values.
n 1 2 3 4 5 6 7
f(n) 19 15 9 1 -9 -21 -35
1st diff -4 -6 -8 -10 -12 -14
2nd diff 2 2 2 2 2
That's just an aside; we're after the general formula. We have
f(1)=19, f(2)=15, f(3)=9
In general we can assume
f(n) = an² + bn + c
We get three equations in three unknowns,
19 = a(1²)+b(1)+c = a+b+c
15 = a(2²) + b(2) + c = 4a + 2b + c
9 = a(3²) + b(3) + c = 9a + 3b + c
That's a 3x3 linear system; it's easy to solve directly. Subtracting pairs,
4 = -3a - b
6 = -5a - b
Subtracting those,
-2 = 2a
a = -1
b = -3a -4 = -1
c = 19-a-b = 21
Answer: f(n) = -n² - n + 21
Check:
f(1) = -1 - 1 + 21 = 19, good
f(2) = -4 - 2 + 21 = 15, good
f(3) = -9 - 3 + 21 = 9, good
f(4) = -16 - 4 + 21 = 1, good
Let's check our extended table, how about
f(7)= -49 - 7 + 21 = -35, good
Whole numbers<span><span>\greenD{\text{Whole numbers}}Whole numbers</span>start color greenD, W, h, o, l, e, space, n, u, m, b, e, r, s, end color greenD</span> are numbers that do not need to be represented with a fraction or decimal. Also, whole numbers cannot be negative. In other words, whole numbers are the counting numbers and zero.Examples of whole numbers:<span><span>4, 952, 0, 73<span>4,952,0,73</span></span>4, comma, 952, comma, 0, comma, 73</span>Integers<span><span>\blueD{\text{Integers}}Integers</span>start color blueD, I, n, t, e, g, e, r, s, end color blueD</span> are whole numbers and their opposites. Therefore, integers can be negative.Examples of integers:<span><span>12, 0, -9, -810<span>12,0,−9,−810</span></span>12, comma, 0, comma, minus, 9, comma, minus, 810</span>Rational numbers<span><span>\purpleD{\text{Rational numbers}}Rational numbers</span>start color purpleD, R, a, t, i, o, n, a, l, space, n, u, m, b, e, r, s, end color purpleD</span> are numbers that can be expressed as a fraction of two integers.Examples of rational numbers:<span><span>44, 0.\overline{12}, -\dfrac{18}5,\sqrt{36}<span>44,0.<span><span> <span>12</span></span> <span> </span></span>,−<span><span> 5</span> <span> <span>18</span></span><span> </span></span>,<span>√<span><span> <span>36</span></span> <span> </span></span></span></span></span>44, comma, 0, point, start overline, 12, end overline, comma, minus, start fraction, 18, divided by, 5, end fraction, comma, square root of, 36, end square root</span>Irrational numbers<span><span>\maroonD{\text{Irrational numbers}}Irrational numbers</span>start color maroonD, I, r, r, a, t, i, o, n, a, l, space, n, u, m, b, e, r, s, end color maroonD</span> are numbers that cannot be expressed as a fraction of two integers.Examples of irrational numbers:<span><span>-4\pi, \sqrt{3}<span>−4π,<span>√<span><span> 3</span> <span> </span></span></span></span></span>minus, 4, pi, comma, square root of, 3, end square root</span>How are the types of number related?The following diagram shows that all whole numbers are integers, and all integers are rational numbers. Numbers that are not rational are called irrational.