The sum of the squares of the first n natural numbers

The sum of the squares of the first n natural numbers
Nicholas Kampouras
Mechanical Engineer M.Sc. AMIMechE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Abstract
Sequence is a group of items set in a specific order. In mathematics “sequence” usually means an ordered list of numbers. The natural numbers are the source of various well known and very interesting sequences. The sum of the terms of a sequence is called series. If a series is converging then the sum has a finite limit. If the series is diverging then such limit does not exist. Consider the sequence and the series of the squares of the natural numbers. It is diverging. That means that the sum of the terms or any partial sum has no finite limit. But what will happen if somebody wants to find the arithmetical value of the sum of the squares of the first thousand natural numbers? Does he have to calculate thousand squares and then adding up these values? Or there is a formula by which he can come up fast and easy with the desired result. The present article presents a method by which we can calculate the arithmetical value of the sum of the squares of the first n natural numbers.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Consider the sequence 1, 22, 32, 42, …, n2
Rewriting the sequence it is  12, 22, 32, 42, …, n2


Visualizing this sequence we can say that we have the area of a 1x1 square then the area of a 2x2 square, the area of a 3x3 and so on (fig.1).
fig.1

Rewriting again the sequence we have 1x12, 1x22, 1x32, 1x42, …, 1xn2, or in simple words we have a brick 1 unit long 1 unit wide and 1 unit tall, then a second brick 2 units long 2 units wide 1 unit tall, then a third one 3 units long 3 units wide 1 unit tall etc (fig.2)

fig.2

The series of the squares of the natural numbers can be written:
1 + 22  + 32 + 42 +…+ n2 = 12  + 22 + 32 + 42 +…+ n2 = (1x12) + (1x22) + (1x32) + (1x42) +  …+(1xn2)
In other words we have to add up the volumes of all the n bricks.
Consider the following example: Calculate the sum of the volumes of two bricks, brick A and brick B. The size of the first one is 2x2x1 and of the second is 3x3x1.
Let’s take the two bricks and stack the first on the top of the second, centered as in fig.3. All we have to do is to calculate the volume of the new solid which looks like a truncated pyramid.
Draw a line from each top corner of the 2x2x1 brick to the correspondent top corner of the 3x3x1 brick and extend them to the ground as in fig.3. The lines from the points E, F, G, and H intersect the ground on the points A, B, C and D. The parallelogram ABCD is a 4x4 square.

fig.3

The ABCDEFGH solid is a truncated pyramid.
We can split the pyramid in two halves, each one of them is a smaller truncated pyramid. The lower pyramid is ABCD1234 and the upper pyramid EFGH1234 fig.4. The volume of the lower pyramid consists of the volume of the brick plus the volumes of four equal sizes prisms and the volumes of eight equal sizes pyramids, the last ones located at the corners of the truncated pyramid fig.4.
Hence

VTR. PY. = VBRICK + 4VPRISM + 8VPYR.

fig.4

The base of the prism is a right angled triangle with a base of 1/2 and a height of 1. The length of the prism is equal to the side of the brick fig.5
The “corner” pyramids have a right angled triangle base 1/2 x1/2 and their height is 1 fig.5.
The same applies for the upper pyramid EFGH1234.


fig.5
:                                                                               
VTR. PY. = VBRICK + 4VPRISM + 8VPYR.
VBRICK = VTR. PY. – 4VPRISM – 8VPYR.
VBRICK = (1/3)*HTR.PY.(B+b+S(Bb)) – 4(1/2*0.5*1)*LPRISM – 8(1/3*1/2*0.5*0.5*1)

VBRICK = (1/3)*HBRICK(B+b+S(Bb)) – LBRICK – 1/3

B  is the area of the big base of the truncated pyramid and b is the area of the small base. The volumes of the “corner” pyramids are independent of the length “L” of the brick.
Then the sum of the volumes of the two bricks is:
The volume of the truncated pyramid ABCDEFGH (fig.4), minus the length of brick A, minus the length of brick B, minus two times 1/3.

VA+VB  = (1/3)(HA+ HB)(B+b+S(Bb)) – LA – LB – 2/3

VA+VB  = (1/3)(1+ 1)(22+42+S(42x22)) – 2 – 3 – 2/3
VA+VB  = (1/3)*2*(4+16+8) – 2 – 3 – 2/3 = 13

That means the method of the truncated pyramid for the calculation of the squares of the natural numbers 2 and 3 is correct because 22 + 32 = 13.
Now consider that we have ten bricks having the same height all of them H=1 and each one having a length and a width corresponding to the first ten natural numbers. We pile one on the top of the other as in fig.6. The area of the small base of the formed truncated pyramid is 1x1 and the area of the big base is 11x11. The height of the same pyramid is 10. The sum of the volumes of the ten bricks is:



fig.6
The area of the big base of the truncated pyramid is B =11x11=121 and the area of the small base b =1x1=1.


V1+V2+V3+ V4+V5+V6+ V7+V8+V9+V10 =
 = (1/3)(H1+H2+H3+H4+H5+H6+H7+H8+H9+H10)(B+b+S(Bb)) –
       (L1 +L2+ L3 +L4+ L5 +L6+ L7 +L8+ L9 +L10) – (10/3) =>

V1+V2+V3+ V4+V5+V6+ V7+V8+V9+V10 =
= (1/3)(1+1+1+1+1+1+1+1+1+1)(112+12+S(112 12 )) –

(1 +2+ 3 +4+ 5 +6+ 7 +8+ 9 +10) – (10/3) = 385 


The result is correct because 12 + 22 + 32 + 42 + 52 + 62 + 72 + 82 + 92 + 102 = 1+4+9+16+25+36+49+64+81+100 = 385.

Now if we consider n bricks where n = 1,2,…,n the truncated pyramid which is formed has a small base with an area of b = 1x1 = 1 and a big base with an area of B = (n+1)(n+1) = (n+1)2. The total volume is:



V1+V2+V3+…+Vn =

= (1/3)(H1+H2+H3+…+Hn)(B+b+S(Bb)) –

– (L1 +L2+ L3 +…+Ln) – (n/3) =>

V1+V2+V3+…+Vn =
= (1/3)*(1+1+1+…+1)((n+1)2+12+(n+1)) –
– (1 +2+ 3 +…+n) – (n/3) =
= (n/3)*((n+1)2+12+(n+1)) – (1 +2+ 3 +…+n) – (n/3) =
= (n/3)*((n+1)2+n+1) – (1 +2+ 3 +…+n) =
= (n/3)*(n2+3n+2) – (1 +2+ 3 +…+n) =
= (n3/3) + n2 + (2n/3) – (1 +2+ 3 +…+n)
 The sum of the first n natural numbers is:

1 + 2 + 3 +…+ n = ((n+1)n)/2 thus

V1+V2+V3+…+Vn = 1*12 + 1*22 +1*32 +…+ 1*n2 =
12 + 22 +32 +…+ n2 = n3/3 + n2 + (2n/3) – n2/2 – n/2 =>
12 + 22 +32 +…+ n2 = (n3/3) + (n2/2) + (n/6)












The harmonic series and the resulting curves

The harmonic series and the resulting curves
Nicholas Kampouras
Mechanical Engineer M.Sc.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------


The Harmonic series is 1+1/2+1/3+1/4+1/5+… (see harmonic series)
The sum of the first n terms is approximately:
γ is the  Euler – Mascheroni constant (see Euler Mascheroni constant)
Let’s consider the harmonic progression:   (see harmonic progression)
αn = 1/n     1, 1/2, 1/3, 1/4, 1/5, 1/6,…

α1
α2
α3
α4
α5
1
1/2
1/3
1/4
1/5


Calling y = αn = 1/n and x = n we have the function y = 1/x,

y1
y2
y3
y4
y5
x1 = 1
x2 = 1/2
x3 = 1/3
x4 = 1/4
x5 = 1/5

Thus the terms of the harmonic progression and their order in the sequence can be graphically represented by the graph of the function y = 1/x.


Now let’s consider a new sequence bn with terms αn as above, in a way that:
bn = (α1 + α2 +…+ αn)

b1
b2
b3
b4
b5
α1
α1 + α2
α1+ α2+ α3
α123 4
α12345
1
1+1/2
1+1/2+1/3
1+1/2+1/3+1/4
1+1/2+1/3+1/4+1/5


Calling bn = y and n = x we have y = lnx + γ.
And the graph of the y = lnx + γ is:





The Sequence of the Arithmetic Mean

A "Sequence" or "Progression" is an ordered list of items or numbers which are called "terms". A "Series" is the summation of all the terms of a sequence.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------
The sequence of “the arithmetic mean” and its application in geometry
Nikolaos Ap. Kampouras
Mechanical Engineer M.Sc. AMIMechE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Abstract
The present article is an example of generating and studying a number sequence in the “old fashioned” way.
Considering two arbitrary numbers (rationals or irrationals), we can generate a sequence, in which each term is the arithmetic mean of the two previous ones. Studying this sequence, surprisingly we discover that converges to 2/3 of the distance between the first and the second term. Further investigation of the sequence of “the arithmetic mean” showed that independently the two first terms, in the terms of the sequence appear as factors the numbers 1/4, 3/8, 5/16, 11/32, 21/64…These numbers form a different sequence, which is not monotone, and converges to the number 1/3.
A very interesting point is the application of the above mentioned sequence in geometry. There is an equivalent of the arithmetic mean in geometry. Considering the lengths of two line segments, as the absolute values of two numbers (rational or irrationals), then the arithmetic mean of the absolute values, is the length of the median of the trapezoid with bases the two segments. A sequence of trapezoid medians can be generated. Their length converges to the length of the segment located on the 2/3 of the height of the initial trapezoid.

1. INTRODUCTION
One of the basic topics of calculus is “Sequences and Series”. Generating sequences is something very entertaining. Studying sequences and calculating series, sometimes is really a difficult task.
The most common sequences are the arithmetic, the geometric and the harmonic. Some known special sequences are the triangular number, the square number, the cube number and the most famous of all, Fibonacci.
Given the fact, that a great number of sequences can be constructed, most of the examples and of the case studies are limited to “typical” sequences belonging to the above categories. Little attention has been given to other types of sequences.
The present article deals with the study of a sequence in which every term is the arithmetic mean of the two previous ones. Using the standard calculus procedures, the study came-up with some interesting issues.

2.  GENERATING THE SEQUENCE
Consider two natural numbers. Let’s say the two most common ones: 1 and 2. Then find the arithmetic mean of these numbers, which is (1+2)/2=1.5 . Next find the arithmetic mean of 2 and 1.5, (2+1.5)/2=1.75 then the arithmetic mean of 1.5 and 1.75 and so on.
Evidently we formed the sequence {αn} of the numbers:
α1
α2
α3
α4
α5
α6
α7
1
2
1.5
1.75
1.625
1.6875
1.65625
Table.1 the first seven terms of {αn}
Generalizing, for any two whole numbers α and b, α<b, we can form a number sequence, where the first term is α, the second term is b, the third term is the arithmetic mean of the first and second term, the fourth term is the arithmetic mean of the second and third term, the fifth term is the arithmetic mean of the third and fourth term and so on.
According to the above:   αn=(αn-2 + αn-1)/2
and the first terms are:

Calculating:
3.  STUDYING THE SEQUENCE
We can see:
*The even numbered terms are greater numbers than the surrounding odd numbered terms         (i.e. α6>α5 and α6>α7).
*The odd numbered terms increase as n®¥
*The even numbered terms decrease as n®¥

*As n®¥ all the terms converge to 1+(2/3)+(5/3)=1.6666666+ (i.e. α15 = 1.666625977+).
If we plot the terms of the sequence, with n on the horizontal axis and αn on the vertical axis we get the following graph (fig.1).
We can observe three things:
- The factors of b and (α+b) are the terms of a new sequence: 1/4, 3/8, 5/16, 11/32, 21/64…
- In any term, the factor of b is equal to the factor of (α+b) of the previous term.
- In any term, the nominator of the factor of (α+b) is the product of the difference denominator-     nominator of the factor of b of the same term.
After the calculation, the first terms of {αn} (table.3) now have the form:
Again we can observe:
* In any term, the factor of α equals the factor of b of the previous term.
* In any term, the factor of b equals the product of difference denominator-factor of α.

4    4.  THE NEW SEQUENCES
Obviously the sequence {αn} includes the sequence {βn}: 1/2, 1/4, 3/8, 5/16, 11/32, 21/64… We could say that {αn} is a function of {βn}, αn = f (βn). Let’s have a closer look on {βn}.

Plotting the graph of {βn} we have:
The graph shows:
~ The sequence {βn} converges to the number   1/3 = 0.33333+
~ The sequence {βn} is bounded, between β1 = 1/2 and β2 =1/4.
~ The sequence {βn} is not a monotone one. 
Now considering the sequence {βn}’ 1/4, 3/8, 5/16, 11/32, 21/64…  {βn}’ is the multiplication product of two sequences:
The {cn}  1, 3, 5, 11, 21, 43, 85 …
The {dn}  1/4, 1/8, 1/16, 1/32, 1/64 …
{βn}’ = {cn}x{dn}. Starting from the easy one. The {dn} is geometric sequence, with common ratio 1/2, monotone (decreasing), converges to 0, and is bounded above by 1/4. The general term formula is



n ³ 2 and the sum of infinite terms is 





Now dealing with {cn}. We will try to find the pattern to generate the terms of {cn}.
c1 =                              2 – 1    = 1
c2 =                        22 – (2 – 1) = 3
c3 =              23 – (22 – (2 – 1)) = 5
c4 =   24 – (23 – (22 – (2 – 1))) = 11
……………………………………………………..
and the general term is cn = 2n – (2n-1 –(2n-2 –…–(22 –(2–1)))…).
Rearranging
cn = 2n – 2n-1 + 2n-2 –…+ 22 – 1 when n is even number
cn = 2n – 2n-1 + 2n-2 –…– 22 + 1 when n is odd number
or 
Cn is an alternating series. Does not fulfill the third criterion of Leibniz theorem therefore diverges. Or in simpler words:
There are two kinds of terms.  The terms to an even power and the ones to an odd power. Both cases are geometrical sequences with common ratio 22 and first term 22 (even power terms) and common ratio 22 and first term 23 (odd power term).
 Thus    
Assuming that, in the n-1 terms we have κ terms to even power and λ terms to odd power, it is:
κ + λ = n-1

When n is an even number, then κ = λ +1 and    
When n is an odd number, then κ = λ   and
So we have
for n = even number, and
for n = odd number.
If we want to define the cn recursively, then cn = 2n – cn-1
Since
(no matter how big or small is the cn-1 always is 2n > cn-1). Therefore cn does not converge and is monotone (increasing). Calculating the finite sum of n terms:
c1 =                                           1

c2 =                                   22 – 1
c3 =                           23 – 22 + 1
c4 =                   24 – 23 + 22 – 1
…………………………………………….
cn-1 =       2n-1 – 2n-2 +…± 22 F1
cn = 2n – 2n-1 + 2n-2 –…+ 22 – 1
Adding the terms of each column we have:
n= even number:
n= odd number:

no matter if n is odd or even number the series        

diverges.



Going back to the sequence βn’ = cnxdn.  Based on the above analysis of cn and dn, we can write the general term formula as follows:
n= even number:
n= odd number:

5. THE “THEOREM” AND THE APPLICATION IN GEOMETRY
Going back to the initial sequence
we consider the
for n>2 the general term formula is
for n= -1, 0, 1, 2, … the general term formula is
easily we can find that:
Looking again at
this can be written
To understand the meaning, we will use the line of the whole numbers.
What we see is that the sequence {αn} converges to a number, which corresponds to a point (on the line) situated on the 2/3 of the distance, |b-a| between the two numbers a, b.
Up to this point, we used only natural numbers. The interesting point is that the above analysis holds for any pair of rational or irrational numbers. Therefore the following theorem can be stated:

“Theorem”:  For any pair a, b of rational or irrational numbers, where a<b, we can form a sequence {αn}. First term is a, second term is b, third term is the arithmetic mean of 1st and 2nd term, forth term is the arithmetic mean of 2nd and 3rd term and so on. Then, this sequence {αn} converges to a number which corresponds to the 2/3 of the distance |b-a| between the two numbers.

Proof: To prove this theorem we will use classical geometry. Consider two line segments, with arbitrary lengths a and b, a<b.

We form the right angled trapezoid ABDC, with short base a and long base b. The median E1E2 is the arithmetic mean of a and b, therefore is the third term α3 of {αn}. In the trapezoid E1E2DC, the median F1F2 is the arithmetic mean of α3 and b, so is the forth term α4 of the {αn}. The same way, in the trapezoid E1E2F2F1, the median G1G2 is the arithmetic mean of the α3 and α4, consequently is the fifth term of {αn}. As n®¥ the median αn tends to be the line segment H1H2 (fig.4).
It is (fig.5) :    H1H2 = CH3 ,  CB1 = a , B1H3 = B1D–H3D = (CD–CB1) – H3= ½b–a½– H3D
From the similarity of triangles H2H3D and BB1D :
Thus B1H3  = |b-a|- k|b-a|  and H1H2 = CB1+B1H3 = a+|b-a|- k|b-a|, what we have to prove now is that
or in other words that
 
 In the trapezoid ABDC and on the side AC, we establish, the minus sign for any displacement from C to A (upwards) and the plus sign for any displacement from A to C (downwards). Let be AC = c, then
Calculating the length of the line segment E1H1
Actually the length of the E1H1 is the sum of the infinite terms of a geometric sequence with first term c/8 and common ratio 1/4.
With the help of the trapezoid ABDC, we can also define recursively the {αn}.
Fig.6 Recursive definition of {αn}

From the similarity of the triangles BB1D, E2E3D, F2F3D (fig.6) and having in mind, that   E2 is the middle point of the side BD and F2 is the middle point of E2D we have:

1    6.  Conclusions
Starting from two natural numbers, we generated a numbers sequence in which every term is the arithmetic mean of the two previous terms. This sequence can be called “the arithmetic means” sequence.
“The arithmetic means” sequence converges to the 2/3 of the distance between the first and second term. Starting from the fifth term and onwards, the above mentioned sequence is the product of two sequences. The first is the geometric dn =   n ³ 2 and the second is the cn = 2n – cn-1  n ³ 2. 
Since all the above apply for any number, rational or irrational, positive or negative, a theorem can be stated. “The arithmetic means” sequence can be generated from any pair of rational or irrational numbers and always converges to the 2/3 of the distance between these two numbers.
Is very interesting the application of the sequence of “the arithmetic means” in geometry. Using two arbitrary line segments as bases, a right angled trapezoid can be formed. The median is the arithmetic mean of the bases. A second trapezoid is already formed from the median and the long base. The new median is the new arithmetic mean. A third trapezoid is formed from the two medians and so on. Each median of these consecutive trapezoids corresponds to a term of the sequence. As “n” tends to the infinite, the median tends to be at the 2/3 of the height of the trapezoid. This is the proof of the theorem.






























       


ü