handling numbers - imagdatamove.imag.fr/denis.trystram/supportsdecours/2017numbers.pdfhandling...

83
Handling numbers Handling numbers Denis TRYSTRAM MoSIG1 Sept. 2017 1 / 70

Upload: others

Post on 23-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Handling numbers

Denis TRYSTRAMMoSIG1

Sept. 2017

1 / 70

Page 2: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Context

The main idea of this presentation is to show some funny results inMathematics (in the field of combinatorics, counting, basic numbertheory).We will show how to handle simple and hard (not straightforward)results with very basic tools that do not require any sophisticatedbackground.Another goal is to present the hidden structures and beauty ofMathematics.

2 / 70

Page 3: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Brief overview of proving techniques

Induction

Contradiction contradictio in contrarium

Combinatoric proofs

Bijections between sets

Pigeon holes

Proofs by computers (for instance the four colors conjecture,which is no more a conjecture).

A nice way for proving results on integers is to represent themby sets of items (bullets, squares, numbers, intervals) and touse the Fubini’s principle1.

Geometric proofs

1explanation is coming soon...3 / 70

Page 4: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

4 / 70

Page 5: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

An old (simple) geometrical proof

This first example has been provided by Al Khwarizmi in the XIIthcentury. It is a nice illustration of what a geometrical proof is.

Solve the equation x2 + 10x = 39.

5 / 70

Page 6: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

An old (simple) geometrical proof

The solution of the equation x2 + 10x = 39 is determined bymeans of the surfaces of elementary pieces.We first represent the left hand side x2 + 4.52x .

x 5/2

xx2

6 / 70

Page 7: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

First example (2)

The surface of the cross depicted below is equal to the right handside. Adding the 4 little squares in the border leads to a totalsurface of 39 + 4.254 = 64, which is the square of 8.

39

25/4

8

We finally deduce x by 8 − 2.52 = 3.

7 / 70

Page 8: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

First example (2)

The surface of the cross depicted below is equal to the right handside. Adding the 4 little squares in the border leads to a totalsurface of 39 + 4.254 = 64, which is the square of 8.

39

25/4

8

We finally deduce x by 8 − 2.52 = 3.

7 / 70

Page 9: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

Remark

This methods is incomplete, since there exists another root for thisequation (x’=-13).

However, as at the time of Al Khawariszmi, maths were mainlyused for solving geometrical problems of the daily life, negativeroots were not considered...

8 / 70

Page 10: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

Another simple way to prove

The informal idea is to establish a one-to-one correspondencebetween elements of a set (integers).

Fubini’s principle2:

Enumerate the elements of a set by two different methods, oneleading to an evidence.

2Guido Fubini 1879-19439 / 70

Page 11: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

A preliminary example

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

10 / 70

Page 12: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Triangular numbers

Definition:Triangular numbers are defined as the sum of the n first integers:∆n =

∑nk=1 k .

There exist many proofs for this result, the simplest one isobtained in writing this sum forward and backward and gatheringthe terms two by two as follows:

2.Δn = 1 + 2 + … + n + n + n-1 + … + 1

= (n+1) + (n+1) + … + (n+1) !

2∆n is n times n + 1, thus, ∆n = (n+1).n2

11 / 70

Page 13: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Another way of looking at this process (1)

Use the Fubini’s principle.

∆n is represented by piles of bullets arranged as a triangle. Puttingtwo copies up side down gives the n by n + 1 rectangle.

1" 2" 3" n"

n" n&1" n&2" 1"2"

12 / 70

Page 14: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Another way of looking at this process (1)

Use the Fubini’s principle.∆n is represented by piles of bullets arranged as a triangle. Puttingtwo copies up side down gives the n by n + 1 rectangle.

1" 2" 3" n"

n" n&1" n&2" 1"2"

12 / 70

Page 15: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Another way of looking at this process (2)The following figure proves the same result by using a geometric(contiguous) argument instead of bullets.

n!1! 2! n!3!

n!

The sum is represented by a tesselation of boxes of size 1 by 1. Theglobal result is determined by the surface of half the square (n

2

2 )plus n times half of the surface of the unit square in the diagonal.Thus, n2

2 + n.12 = (n+1).n2

13 / 70

Page 16: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Another way of looking at this process (2)The following figure proves the same result by using a geometric(contiguous) argument instead of bullets.

n!1! 2! n!3!

n!

The sum is represented by a tesselation of boxes of size 1 by 1. Theglobal result is determined by the surface of half the square (n

2

2 )plus n times half of the surface of the unit square in the diagonal.Thus, n2

2 + n.12 = (n+1).n2

13 / 70

Page 17: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Sum of two consecutive triangular numbersAn interesting question is to compute ∆n + ∆n−1.Computing the first ranks leads us to an evidence: ∆1 + ∆0 = 1,then, 4, 9, 16, 25, 36, ...It is natural to guess ∆n = n2, which is easy provable by induction(or alternatively, using the expression ∆n + ∆n−1 = n + 2∆n−1

since ∆n = n + ∆n−1).

This result can be directly obtained using a geometric pattern:

n"1$

n$

Δn$

14 / 70

Page 18: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Sum of two consecutive triangular numbersAn interesting question is to compute ∆n + ∆n−1.Computing the first ranks leads us to an evidence: ∆1 + ∆0 = 1,then, 4, 9, 16, 25, 36, ...It is natural to guess ∆n = n2, which is easy provable by induction(or alternatively, using the expression ∆n + ∆n−1 = n + 2∆n−1

since ∆n = n + ∆n−1).This result can be directly obtained using a geometric pattern:

n"1$

n$

Δn$

14 / 70

Page 19: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Basic summations (triangular numbers)

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

15 / 70

Page 20: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Sum of odds

Determine the sum of the first odd integers, denoted bySn =

∑n−1k=0(2k + 1).

This result may again be established by using Fubini’s principle.The bullets depict the consecutive odd numbers.The arrangement of the bullets gives us two ways for counting.

16 / 70

Page 21: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Sn = n2

17 / 70

Page 22: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Rearranging the figure as a butterfly gives an insight of anotherexpression of ∆n + ∆n−1.

Δn!

The analytic expression is as follows:

Δn + Δn-1 = 1 + 2 + 3 + … + n + 1 + 2 + … + n-1

= 1 + 3 + 5 + … + (2n-1) !

18 / 70

Page 23: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

We can also imagine an alternative construction which uses fourcopies of Sn that exactly correspond to an 2n by 2n square asdepicted in the figure.

2n#1%

2n#1%

This leads to 4.Sn = (2n)2, thus Sn = n2.

19 / 70

Page 24: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

We can also imagine an alternative construction which uses fourcopies of Sn that exactly correspond to an 2n by 2n square asdepicted in the figure.

2n#1%

2n#1%

This leads to 4.Sn = (2n)2, thus Sn = n2.

19 / 70

Page 25: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Generalization (1)Both previous examples of triangular and sum of odd numbers arespecial cases of arithmetic progressions: starting at p1 = a,pn = pn−1 + b for n > 2.

The figure below shows that the sum of the n first elements of anarithmetic progression is equal to n.a + ∆n−1.b.

a b

For instance, a = 1 and b = 2 for the sum of the first n oddnumbers. We have Sn = n + 2.∆n−1 = n + n(n − 1) = n2.

20 / 70

Page 26: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Generalization (1)Both previous examples of triangular and sum of odd numbers arespecial cases of arithmetic progressions: starting at p1 = a,pn = pn−1 + b for n > 2.

The figure below shows that the sum of the n first elements of anarithmetic progression is equal to n.a + ∆n−1.b.

a b

For instance, a = 1 and b = 2 for the sum of the first n oddnumbers. We have Sn = n + 2.∆n−1 = n + n(n − 1) = n2.

20 / 70

Page 27: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Generalization (2)Another interesting case is for a = 1 and b = 5 (1, 5, 9, 13, 17, ...).The sum is equal to n(2n − 1) = n + 4∆n−1 = ∆n + 3∆n−1.

Δn-1Δn-1

Δn-1

Δn

The figure above evidences that it is also a triangular number(∆2n−1).

21 / 70

Page 28: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Generalization (2)Another interesting case is for a = 1 and b = 5 (1, 5, 9, 13, 17, ...).The sum is equal to n(2n − 1) = n + 4∆n−1 = ∆n + 3∆n−1.

Δn-1Δn-1

Δn-1

Δn

The figure above evidences that it is also a triangular number(∆2n−1).

21 / 70

Page 29: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of odd numbers

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

22 / 70

Page 30: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Tetrahedral numbers

Tetrahedral numbers

Definition:The sum of the ∆n is denoted by Θn: Θn =

∑nk=1 ∆k .

A way to compute it is to consider 3 copies of Θn and organizethem smartly3 as a triangle.

11 2

1 2 31 2 3 …

1 2 3 … n

3the way we established the closed formula for triangular numbers wasbased on 2 copies arranged up side down

23 / 70

Page 31: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Tetrahedral numbers

The proof is obtained by Fubini’s principle by rotating this triangleas shows below:

12 1

3 2 1… 3 2 1

nn-1 n-1

… … …2 2 2 2

11 2

1 2 31 2 3 …

1 2 3 … n n … 3 2 1 1 1 1 1 1

The sum of the first row is equal to n + 2.The second one is equal to 3 + 3 + 2(n − 1) = 2(n + 2).

Let us sum up the elements in row k :∆k + ∆k + k(n − k + 1) = k(k + 1) + kn − k2 + k = k(n + 2).Thus, the global sum is equal to (n + 2) times (1 + 2 + ... + n).

Finally, 3Θn = (n + 2)∆n

24 / 70

Page 32: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Tetrahedral numbers

The proof is obtained by Fubini’s principle by rotating this triangleas shows below:

12 1

3 2 1… 3 2 1

nn-1 n-1

… … …2 2 2 2

11 2

1 2 31 2 3 …

1 2 3 … n n … 3 2 1 1 1 1 1 1

The sum of the first row is equal to n + 2.The second one is equal to 3 + 3 + 2(n − 1) = 2(n + 2).Let us sum up the elements in row k :∆k + ∆k + k(n − k + 1) = k(k + 1) + kn − k2 + k = k(n + 2).Thus, the global sum is equal to (n + 2) times (1 + 2 + ... + n).

Finally, 3Θn = (n + 2)∆n

24 / 70

Page 33: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Synthesis

We proved some results in this chapter, in particular:

Idn = 1 + 1 + ... + 1 = n

∆n = 1 + 2 + 3 + ... + n = 12 .Idn.(n + 1)

Θn = ∆1 + ∆2 + ... + ∆n = 13 .∆n.(n + 2)

A natural question is if we can go further following the samepattern for computing

∑nk=1 Θk , and so on. The next ones are the

pentatope numbers (defined by Πn), defined as the sum of Θn.

25 / 70

Page 34: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

More properties

If we write these numbers as polynomials of n, we obtain:

Rank 1. Idn = n

Rank 2. ∆n = 12n(n + 1)

Rank 3. Θn = 16n(n + 1)(n + 2) where 6 = 1 × 2 × 3.

Rank 4. Πn = 124n(n + 1)(n + 2)(n + 3) where

24 = 1 × 2 × 3 × 4.

The next one (rank 5) is 15!n(n + 1)(n + 2)(n + 3)(n + 4)

As these numbers are integers, in particular n(n + 1)(n + 2)(n + 3)is a multiple of 24 = 1 × 2 × 3 × 4.Let us denote this number by Pn.

26 / 70

Page 35: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Four consecutive numbers

The proof involves only simple parity arguments and somegeometrical figures.First, we remark that Pn is divisible by 3 since there is at least onemultiple of 3 in the product of any three consecutive numbers.Then, we prove that it is also divisible by 8. It is easy bydecomposing it into two properties:

27 / 70

Page 36: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Property 1.

Pn is equal to a square minus 1.For instance: P3 = 3 × 4 × 5 × 6 = 192 − 1 orP7 = 7 × 8 × 9 × 10 = 712 − 1.

Let us compare the extreme product n(n + 3) to the medium one(n + 1)(n + 2):n(n + 3) = n2 + 3n and (n + 1)(n + 2) = n2 + 3n + 2.

28 / 70

Page 37: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Proof by a geometrical argument.

(n+1)(n+2)

n(n+3)

29 / 70

Page 38: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

n(n+3)+1+1

n(n+3)

n(n+3)+1

n(n+3)+1

It is a perfect square (n(n + 3) + 1)2 minus 1 (the blue littlesquare).

30 / 70

Page 39: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Property 2.

Now, we show by a geometrical proof that the squares of oddnumbers are congruent to 1 modulo 8.This is the case for 32 = 8 + 1, 52 = 3× 8 + 1, 72 = 6× 8 + 1, etc.4

4The result can also be proved analytically as follows:(2q + 1)2 = 4q2 + 4q + 1 = 4q(q + 1) + 1. As one of the consecutive numbersq and q + 1 is even, we obtain: (2q + 1)2 = 8k + 1.

31 / 70

Page 40: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Consider the little square at the center of the (2q + 1)2 square.

32 / 70

Page 41: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Consider the top-right quadrant.

There are 8 equal sizes quadrants around the little square.

33 / 70

Page 42: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

At this point, we can establish a link with triangular numbers.Looking more carefully at the previous figure, we remark that eachof the 8 quadrants is composed of a series of 1 unit square,followed by 2 unit squares and so on, up to q unit squares.

This can be easily proved by the relation:(2q+1)2−1

8 = 4q2+4q+1−18 = 4q(q+1)

8 = ∆q.

34 / 70

Page 43: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Coming back to P(n)

We proved two properties:

1 P(n) = x2 − 1 for some x .

2 The squares of odd numbers are congruent to 1 modulo 8.

We deduce immediately that P(n) is a multiple of 8:As P(n) is even, x2 (and x) is odd.x2 = 8k + 1 = P(n) + 1Thus, P(n) is a multiple of 8.

As it is also a multiple of 3, it is a multiple of 4!.

35 / 70

Page 44: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Other related problems

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

36 / 70

Page 45: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Sum of squares

Definition:The n-th pyramid number is �n =

∑nk=1 k

2.

37 / 70

Page 46: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Expand the sum to compute the sum of squares

The idea is to replace the sum by a double sum of a simplerexpression:

+2+21 +3+3+3+ +n+… +nn'mes

+21 +3 +n+… +n+… +n

2+33

+…=

Row k can be written as: ∆n − ∆k

�n = ∆n + (∆n − ∆1) + (∆n − ∆2) + ... + (∆n − ∆n−1)

38 / 70

Page 47: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Link with triangular and tetrahedral numbers

�n = ∆n + (∆n − ∆1) + (∆n − ∆2) + ... + (∆n − ∆n−1)= n.∆n −

∑1≤k≤n−1 ∆k

= n.∆n − Θn−1

= n n(n+1)2 − (n−1)n(n+1)

6

= n(n+1)6 (3n − (n − 1))

= n(n+1)6 (2n + 1)

=n(n+ 1

2)(n+1)

3

39 / 70

Page 48: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Geometrical method for the sum of squares

n

n

40 / 70

Page 49: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Geometrical method for the sum of squares

2n+1

n

n

41 / 70

Page 50: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Geometrical method for the sum of squares

n-1

42 / 70

Page 51: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Geometrical method for the sum of squares

43 / 70

Page 52: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Geometrical method for the sum of squares

Δn

44 / 70

Page 53: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

The previous result can be written as: 3�n = (2n + 1)∆n

45 / 70

Page 54: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

3D Geometrical construction

First step: gathering the squares in a pyramid-like pattern.

46 / 70

Page 55: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Second step: 3 copies of pyramids

47 / 70

Page 56: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Third step: Recomposing a compact figure from thepyramids

48 / 70

Page 57: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

The previous result can be written as: 3�n = n.n.(n + 1) + ∆n

49 / 70

Page 58: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

A nice property of pyramid numbers

An interesting question is to compute the sum of two consecutivetetrahedral numbers: Θn + Θn−1

5.Recall the first pyramid numbers: 1, 5, 14, 30, 55, ....

It is equal to �n

The proof is straightforward by applying the definition:Θn =

∑nk=1 ∆k

Θn + Θn−1

= (∆n + ∆n−1) + (∆n−1 + ∆n−2) + ... + (∆2 + ∆1) + ∆1

= n2 + (n − 1)2 + ... + 22 + 1 = �n

5similarly as what we did for ∆n + ∆n−150 / 70

Page 59: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

A nice property of pyramid numbers

An interesting question is to compute the sum of two consecutivetetrahedral numbers: Θn + Θn−1

5.Recall the first pyramid numbers: 1, 5, 14, 30, 55, ....

It is equal to �n

The proof is straightforward by applying the definition:Θn =

∑nk=1 ∆k

Θn + Θn−1

= (∆n + ∆n−1) + (∆n−1 + ∆n−2) + ... + (∆2 + ∆1) + ∆1

= n2 + (n − 1)2 + ... + 22 + 1 = �n

5similarly as what we did for ∆n + ∆n−150 / 70

Page 60: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Is there any equivalent of the sum of odd numbers?

We established a strong link between sum of odds (2n + 1) and thesum of consecutive triangular numbers.

According to the binomial expression, the next step is to computethe sum of hexagonal numbers 3n2 + 3n + 1.(n + 1)2 = n2 + 2n + 1(n + 1)3 = n3 + 3n2 + 3n + 1

Do you think that such numbers are linked with the sum of twoconsecutive tetrahedral numbers?

51 / 70

Page 61: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Pyramid numbers (Sum of squares)

Content

1 A preliminary example

2 Basic summations (triangular numbers)

3 Sum of odd numbers

4 Tetrahedral numbers

5 Other related problems

6 Pyramid numbers (Sum of squares)

7 Sum of cubes

52 / 70

Page 62: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Sum of n first cubes

Cn =∑n

k=1 k3

A straightforward upper bound is n4 since each of the n terms ofthe sum is less than n3. This bound may be refined using theanalogy of integrals and Riemann’s sum, which leads to a value oforder n4

4 . Let us determine it precisely.

53 / 70

Page 63: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Link with triangular numbers

A good starting point to give us an idea is to compute the firstranks:C1 = 1, C2 = 9 = 32, C3 = 36 = 62, C4 = 100 = 102, ...

All these values are perfect squares.A more attentive observation evidences a link with the triangularnumbers (1,3,6,10, ...):

Cn = ∆2n.

54 / 70

Page 64: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Link with triangular numbers

A good starting point to give us an idea is to compute the firstranks:C1 = 1, C2 = 9 = 32, C3 = 36 = 62, C4 = 100 = 102, ...

All these values are perfect squares.

A more attentive observation evidences a link with the triangularnumbers (1,3,6,10, ...):

Cn = ∆2n.

54 / 70

Page 65: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Link with triangular numbers

A good starting point to give us an idea is to compute the firstranks:C1 = 1, C2 = 9 = 32, C3 = 36 = 62, C4 = 100 = 102, ...

All these values are perfect squares.A more attentive observation evidences a link with the triangularnumbers (1,3,6,10, ...):

Cn = ∆2n.

54 / 70

Page 66: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Summing the odd numbers leads to the sum of cubes

A way to prove this result is to solve the problem using anintermediate one, namely, the sum of odd numbers (which is equalto a square).The figure shows an organization of the odd numbers (left side)where each row corresponds to a cube of the number of elementsin the row (right side).

1"3" 5"

7" 9" 11"13" 15" 17" 19"

1"3" 5"

7" 9" 11"13" 15" 17" 19"

13"

23"

33"

43"

55 / 70

Page 67: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

A little more effort...

The summation over each column, which makes the cubes is notobvious.

1"3" 5"

7" 9" 11"13" 15" 17" 19"

13"

23"

33"

43"

As each row contains one more integers, row k contains the sum ofodds from ∆k−1 + 1 to ∆k .

= (k(k+1)2 )2 − (k(k−1)

2 )2 = k2

4 ((k + 1)2 − (k − 1)2) = k2

4 (4k) = k3

56 / 70

Page 68: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

A little more effort...

The summation over each column, which makes the cubes is notobvious.

1"3" 5"

7" 9" 11"13" 15" 17" 19"

13"

23"

33"

43"

As each row contains one more integers, row k contains the sum ofodds from ∆k−1 + 1 to ∆k .

= (k(k+1)2 )2 − (k(k−1)

2 )2 = k2

4 ((k + 1)2 − (k − 1)2) = k2

4 (4k) = k3

56 / 70

Page 69: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

A structural evidence?

Let us look at row k more carefully.

13 5

7 9 1113 15 17 19

31 33 35 37 39 4121 23 25 27 29

57 / 70

Page 70: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

13 5

7 32 1113 15 17 19

31 33 35 37 39 4121 23 52 27 29

22

42

62

58 / 70

Page 71: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Using Fubini’s principle (again)

An alternative proof is to determine this result directly by usingmultiplicative tables (each row/column is multiplied by the nextinteger).

12345

246810

3691215

48121620

510152025

x5x4x3x2

+

59 / 70

Page 72: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Using classical multiplication tables

The sum of all the elements in column k of this matrix is equal tok times the triangular number ∆n. Thus, the global sum is:1.∆n + 2.∆n + ... + n.∆n = (1 + 2 + ... + n).∆n = ∆2

n.

60 / 70

Page 73: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Using Fubini’s again, it is easy to remark that the same global sumcan also be obtained by summing the n quadrants:

12.45

24.810

.

.

.1215

48121620

510152025

2+4+2=233+6+9+6+3=33

+

Each of these partial sums at rank k is k times theascending/descending triangular numbers:k .(1 + 2 + ...+ (k−1) +k + (k−1) + ...+ 2 + 1) = k .(∆k + ∆k−1).From the previous result ∆k + ∆k−1 = k2, the sum of the elementsin quadrant k is k3. Thus, the global sum is equal to

∑nk=1 k

3.

61 / 70

Page 74: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Alternative geometrical proof

Another way of determining the sum of cubes by means oftriangular numbers.The idea is that the cube of k is written as k times the squares kby k .

Summation of the first two cubes:

62 / 70

Page 75: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Alternative geometrical proof

Another way of determining the sum of cubes by means oftriangular numbers.The idea is that the cube of k is written as k times the squares kby k .

Summation of the first two cubes:

62 / 70

Page 76: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Rearranging 23

63 / 70

Page 77: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Adding the term 33

3

2

1

Notice here that the fit is perfect when the number of squares isodd.

64 / 70

Page 78: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

General iteration of the summation of cubes

There are n + 1 squares to distribute on both sides.

If n + 1 is odd, we observed that the distribution is perfect.If n + 1 is even, we distribute n+1

2 squares (n + 1) by (n + 1) andthere is an overlap of half a square.

The length of each side is equal to (n + 1)n+12 − n+1

2 = ∆n.

65 / 70

Page 79: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

General iteration of the summation of cubes

Δn

n+1

(n+1)/2

(n+1)/2

66 / 70

Page 80: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Geometrical method for the sum of cubes (1)We present here a 2 dimensional geometrical proof for the sameresult.

Cn = 1 + 2.4 + 3.9 + ... + n.n2

67 / 70

Page 81: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Geometrical method for the sum of cubes (2)

Let organize them in the following pattern.

n

68 / 70

Page 82: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Geometrical method for the sum of cubes (3)

(n+1)n

69 / 70

Page 83: Handling numbers - imagdatamove.imag.fr/denis.trystram/SupportsDeCours/2017Numbers.pdfHandling numbers Sum of odd numbers Content 1 A preliminary example 2 Basic summations (triangular

Handling numbers

Sum of cubes

Analysis

The previous construction shows that 4 copies of Cn is a perfectsquare ((n + 1).n by (n + 1).n).

4Cn = ((n + 1).n)2

Cn = ∆2n

70 / 70