sigma(n)^2 == sigma(n^3)

524 days ago by mpaul

Let's create a list of the first n positive integers:

 

n = 10 [1..n] 
       
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Now let's add them up and square the sum.

In other words, we are finding (1 + 2 + 3 + ... + n)^2.

sum([1..n])^2 
       
3025
3025

Expressed in sigma notation, we have just found (\sum_{x = 1}^{n}x)^2.

 

Now let's find the cubes of the original n terms.

 

[x^3 for x in [1..n]] 
       
[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]

And now let's add up the cubes.  In other words, we are finding 1^3 + 2^3 + 3^3 + ... + n^3.

sum([x^3 for x in [1..n]]) 
       
3025
3025

Expressed in sigma notation, we have found \sum_{x = 1}^{n}x^3

 

Experiment with different values of n and verify whether or not

(1 + 2 + 3 + ... + n)^2 = 1^3 + 2^3 + 3^3 + ... + n^3,

or (\sum_{x = 1}^{n}x)^2 = \sum_{x = 1}^{n}x^3.

n = 10 seq1 = [1..n] seq2 = [i^3 for i in seq1] seq1; sum(seq1); (sum(seq1))^2; seq2; sum(seq2) 
       
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
55
3025
[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
3025
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
55
3025
[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
3025