A computer engineer wrote a software program that assigns a value each time the program is run. The first 5 assigned values are listed below.

–2, 5, 12, 19, 26

Which formula did the engineer use to determine the assigned values, where n is the number of times the program was run?

A.

B.

C.

D.

1 answer

To find the formula that generates the assigned values based on the sequence given, we can analyze the pattern of the values provided: -2, 5, 12, 19, 26.

First, let’s denote the assigned values by V(n), where n is the number of times the program was run. We can look at the sequence of values for different values of n:

  • V(1)=2
  • V(2)=5
  • V(3)=12
  • V(4)=19
  • V(5)=26

Next, we can calculate the difference between each successive value in the sequence:

5(2)=7 125=7 1912=7 2619=7 

The common difference is 7, which indicates that this is an arithmetic sequence with a constant difference of 7.

The formula for the n-th term of an arithmetic sequence can be expressed as:

V(n)=V(1)+(n1)d

where V(1) is the first term, d is the common difference, and n is the term number.

Substituting the values we know:

  • The first term V(1)=2
  • The common difference d=7

We can write:

V(n)=2+(n1)7

Simplifying this expression gives:

V(n)=2+7n7=7n9

Thus, the formula that the engineer used to determine the assigned values is:

7n9