Question 1208432
.
When pipe is transported it is bundled into regular hexagons for stability during shipment. 
Let n be the number of pieces of pipe on any side of the regular hexagon. 
Write a rule for this situation. How many pieces of pipe are in a bundle when n = 12 ?
~~~~~~~~~~~~~~~~~~~~~~~


<pre>
A regular hexagon consists of 6 congruent equilateral triangles.


Let's consider one such a triangle as a bundle of pipes.


The number of pipes in one such a triangled bundle, with n pipes along each side 
is the sum

     1 + 2 + 3 + . . . + n = {{{(n*(n+1))/2}}}.    (1)


It is the sum of first n natural numbers, so this formula is very well known.


OK. But we have 6 such triangles in the hexagon.  So, the first move is to multiply 
the right side of (1) by 6 and to get  3n*(n+1).


But doing this way, we count n pipes twice along each common side of these triangles.
So, from 3n(n+1) we should subtract 6n to get  3n*(n+1) - 6n.


But this is not the end.


When we multiplied (1) by 6, we counted the central pipe 6 times.

Then we subtracted it 6 times.

Now to compensate everything, we should add 1 for the central pipe.


So, the final formula is 

    f(n) = 3n*(n+1) - 6n + 1,    (2)


or, which is the same

    f(n) = 3n^2 - 3n + 1.        (3)


You may check, using your pictures for small  n = 2, 3, 4,  that this formula is correct.


    f(12) = using formula (2) = 3*12*13 - 6*12 + 1 = 397.
</pre>

Solved, with explanations.


Thank you for asking.



Hope you will have fun reading this solution.