Question 1208432
<br>
Referring to the diagram on the referenced page will help understand the discussion below.<br>
Let P(n) represent the number of pipes in the array when each side of the array is n units long.<br>
When n=1, the "array" of pipes is a single pipe: P(1) = 1.<br>
To make the array with n=2, you need to add 6(n-1) = 6(1) = 6 pipes to the array.  P(2) = 1+6 = 7.<br>
To make the array with n=3, you need to add 6(n-1) = 6(2) = 12 pipes to the array.  P(3) = 7+12 = 19.<br>
To make the array with n=4, you need to add 6(n-1) = 6(3) = 18 pipes to the array.  P(4) = 19+18 = 37.<br>
To make the array with n=5, you need to add 6(n-1) = 6(4) = 24 pipes to the array.  P(5) = 37+24 = 61.<br>
Now look at the sequence of values for P(n):<br>
1, 7, 19, 37, 61, ...<br>
You can find a polynomial expression for P(n) using the method of finite differences.<br>
To use the method of of finite differences, you look at the differences between the terms of the sequence, then you look at the differences between those differences (the "second differences"), then you look at the differences between those second differences (the "third differences"), and so on, until you find a sequence of differences which is constant.<br>
When you get a constant difference with the n-th differences, the polynomial will be of degree n.<br>
Let's look at the sequence and its differences....<br><pre>

   1   7  19  37  61    the sequence
     6  12  18  24      the first differences
       6   6   6        the second differences</pre>
The second differences are constant, so P(n) is a quadratic polynomial, of the form {{{an^2+bn+c}}}.<br>
One way to determine the polynomial is to form three equations in a, b, and c for any three of the known values of n.  This will be easiest if you use n = 1, 2, and 3, since the numbers in the equations will be smaller.<br>
Doing that is a good exercise in solving systems of polynomial equations; you might want to try to do that to see if you can get the result shown below.<br>
If the polynomial is quadratic, I like to use a different method for determining the polynomial.<br>
To do this, you need to know that the constant second difference is 2 times a, the leading coefficient of the polynomial.  (If you have studied some calculus, this is due to the fact that the second derivative of a quadratic function is a constant.)<br>
Since the constant difference is 6, the leading term of the quadratic polynomial is {{{3n^2}}}.<br>
Use that leading term and the known values of the terms of the sequence to determine the linear part of the polynomial.<br><pre>

     n   P(n)  3n^2  difference P(n)-3n^2
  ----------------------------------------
     1     1      3      -2
     2     7     12      -5
     3    19     27      -8
     4    37     48     -11</pre>
The linear expression that produces that sequence of differences is {{{-3n+1}}}<br>
So the quadratic polynomial that gives the number of pipes in an array when the number of pipes on each edge of the array is n is<br>
{{{P(n)=3n^2-3n+1}}}<br>
I assume that is the desired answer when the problem says to "write a rule for this situation".<br>
When the number of pipes on each side of the array is 12, the number of pipes in the array is<br>
ANSWER: {{{P(12)=3(12^2)-3(12)+1=432-36+1=397}}}<br>
You can learn much more than you ever want to know about this sequence on the Online Encyclopedia of Integer Sequences, at the following URL:<br>
oeis.org<br>
-----------------------------------------------------------<br>
NOTE: See the response from tutor @ikleyn for a very different and equally good solution, using less formal algebra and a lot of good logical analysis.<br>