Respuesta :

DeanR

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