Introducing Runsums - a sum of consecutive integers

The calculators on this page require JavaScript but you appear to have switched JavaScript off (it is disabled). Please go to the Preferences for this browser and enable it if you want to use the calculators, then Reload this page.

Contents of this page The icon means there is a You do the maths... section of questions to start your own investigations. The calculator icon indicates that there is a live interactive calculator in that section. Theicon means there is asection of questions to start your own investigations. Thecalculator icon indicates that there is a live interactive calculator in that section.

Runsums: Sums of Runs

such as 2, 3, 4 ; and 7 is a run even though it contains just a single number but not 5, 6, 8, 9 because 7 is missing and not 2, 3, 3 because 3 is repeated

a sum of numbers in a run

9 = 2 + 3 + 4 = 4 + 5 10 = 1 + 2 + 3 + 4 11 = 5 + 6 12 = 3 + 4 + 5 13 = 6 + 7 14 = 2 + 3 + 4 + 5

Making a table of runsums

SUMS To 1 2 3 4 5 6 7 8 9 F

r

o

m 1 1 1+2= 3 1+2+3= 6 1+2+3+4

= 10 1+2+3+4+5

= 15 21 28 36 2 2 2+3= 5 2+3+4= 9 2+3+4+5

= 14 20 27 35 3 3 3+4= 7 3+4+5= 12 18 25 33 4 4 4+5= 9 15 22 30 5 5 11 18 26 6 6 13 21 7 7 15 8 8 9 9

entry

You do the maths...

9 occurs in row 2 and column 4 and so the sum of the numbers from 2 to 4 is 9: checking: 2+3+4 is 9.

So by looking at the numbers in the table, we can find runsums.

Find two more locations in the table with 9 in it. What runsums are they? How many runsums can you find for 12? How many runsums for 15 can you find in the table? Use your table to find all the runsums of 2, 3, 4, 5, 6, 7, 8, 9 and 10.

There is only one runsum for 1 and for 2. If there is more than one runsum for a number, write each runsum on a line of its own in the right box.

Put your results into a new table like this: n 1 2 3 4 5 6 7 8 9 ... runsums

of n 1 2 3

1+2 4 ? ? ? ? 9

2+3+4

4+5 ... Is our table big enough to find all the runsums for 20?

No, because some of the lower rows do not go far enough to the right. Extend your table so that you are sure all the numbers up to 20 are in your extended table and then answer these questions: Find all the runsums of 15 Extend your new table of all runsums so that it includes all the runsums up to 20.

Triangular Numbers

...

In these triangles, there are 1, 3, 6 and 10 balls.

How many will there be in the next triangle, the one with 5 on the bottom row?

The numbers in this series are called Triangular Numbers and we give them the names T(1), T(2), T(3) and so on e.g.T(1) = 1, T(2) = 3, T(3) = 6. The tenth Triangular number's pattern will have 10 items on the bottom row and 1 on the top row, a total number of T(10) objects in it.

Looking at all the rows in one pattern above, the total number of boxes is:

1 = 1 in the first

1 + 2 = 3 in the second

1 + 2 + 3 = 6 in the third

1 + 2 + 3 + 4 = 10 in the fourth

and so on.

So can you now calculate T(10) without drawing it?

T(10) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55.



To summarise:

All triangular numbers are runsums - the special runsums that begin at 1.

T(n)'s longest row is of length n.

T(n) is the sum of the numbers from 1 up to and including n.



i 0 1 2 3 4 5 6 7 8 9 10 11 12 T(i) 0 1 3 6 10 15 21 28 36 45 55 66 78 The first 12 Triangular numbers

Runsums and Triangular Numbers

T(6)

T(3)

21

6

4 + 5 + 6

This will work for any runsum. For instance, 11 = 5 + 6. The largest number in the runsum is 6 so we start with T(6)'s triangle. But our runsum begins at 5, so we have removed T(4) = 1 + 2 + 3 + 4. Therefore

11 = 5 + 6 = T(6) - T(4)

Any runsum can be written as the difference between two triangular numbers

If N = a + (a+1) + ... + b then N = T(b) – T(a–1)

Note that a can be 1 so that N = T(b) –T(0) = T(b) and we include the triangular numbers themselves as runsums.

The shape of a triangle with its top cut off is called a trapezium and so runsums are also called trapezoidal arrangements or trapezoids (in article 1999.1.6 in the Journal of Integer Sequences, Vol 2 (1999) by Tom Verhoeff of Eindhoven University of Technology).

Numbers with several runsums

Trivial and interesting runsums

You do the maths...

Find another number that has no single runsums (hint: apart from 4, there is another one less than 10). What is the SMALLEST number that is a sum of a run of three numbers? What is the smallest sum of four numbers in a run? .. and five? By spotting the pattern can you tell me what is the smallest number which is a sum of one hundred consecutive numbers - but I want to know HOW you know too! Mathematicians call the single-number runsums trivial (meaning that they are not very interesting cases) and the others are non-trivial or proper runsums (the interesting ones).

I went on looking for a proper runsum for 4 and 8, and I still couldn't find any.

I did notice that 9 was also interesting because it was the first number I that had three different runsums: 9 = 2 + 3 + 4 = 4 + 5

I then found that 27 had four different runsums, what were they? What is the smallest number with four different runsums? I thought I'd see if I could find a number with five runsums but when I was searching, I found a number with six runsums!

What is the smallest six runsum number that I could have found? How many numbers between 2 and 100 have six different runsums?

While trying to answer the last question, I did find just one number with exactly five runsums. What was it? There were still some numbers in the range 2 to 100 that seemed to have no runsums longer than one number.

Can you spot a pattern in the list of such numbers? What is special about the numbers with exactly three runsums (such as 9)?

A Runsum Calculator

Italic parts are optional. the sum of all the whole numbers from up to all shortest longest

runs with a sum of up to with sum starting ending at runs

runs of length from

to that are the sums of exactly at least up to runs with runsums T( ) up to T( ) Clear



R E S U L T S : Runsums Friend & Neighbours C A L C U L A T O R

the sum of the numbers from 200 to 800 is 300500;

there are 12 runsums for 9999 and it will show you what they are.

You do the maths...

What is the sum of all the numbers from 2 to 8? from 20 to 80? from 200 to 800? [Why is it not 10 times the answer above?] Can you spot the pattern in these answers? Try the same thing but for 2 to 9, 20 to 90, etc. Is there a pattern now? What about 3 to 7, 30 to 70, and so on? Is there a pattern here? Try 10 to 14, 110 to 114, 1110 to 1114 and so on. How would you describe this pattern? Can you find more number patterns like these? Please email me (address at foot of page) with your answers to these questions and the results will be put on this site for others to see. There are probably many kinds of patterns here! A more advanced Project (age 15 and above):

Let's use the notation sum(a,b) to mean the sum of all the numbers from a to b.

So sum(2,5) = 2+3+4+5 = 14 . What is sum(1,2) ? sum(1,3) ? sum(1,4) ? Find a formula for sum(1,b) . What is the name for the series of numbers of the previous question? What is sum(10,20) ? Suppose we know that sum(1,20) = 210 and sum(1,9) = 45 , how can we use these two values to compute sum(10,20) ? Using your formula for sum(1,b) , use it to write down a formula for sum(a,b) .

Quick Ways To Calculate Runsums

A Basic Formula and proof

10 11 12 13 14 15 16 17 18 19 20 20 19 18 17 16 15 14 13 12 11 10

This adds two copies of the list so the list 10 to 20 has a sum of 330/2 = 165.

This method applies to all lists of consecutive numbers from a to b.

Each column has the same sum: a+b and there are b–a+1 columns.

So (b–a+1)(a+b) is twice the sum of the numbers from a to b:

Let's use sum(a,b) to mean a + (a+1) + (a+2) + ... + b

So our first forumula is

sum(a,b) = (b – a + 1)(a + b) = (b – a + 1) (a + b) 2 2

sum(a,b) = number of values × average value

where the average value is (a + b)/2 and

the number of values is b – a + 1

6

20

(20 – 6 + 1) = 15

6 + 20 = 26

15 × 26

15 × 13

195

When the runsums start at 1 we have a formula for the sum of the first n numbers, or the n-th triangle number T(n):

T(n) = 1 + 2 + ... + n = n (n + 1) 2

An easier formula for mental arithmetic

sum(a,b) = (b – a + 1)(a + b) 2 = b2 – a2 + b + a 2 or sum(a,b) is (the difference of the squares of a and a PLUS their sum) over 2 oris (the difference of the squares ofandPLUS their sum) over 2

sum(6,20)

202 = 400

62 36

364

6 + 20 = 26

364

390

195

Friends and Neighbours

runsums that have one number in common

2 + 3 + 4 = 4 + 5

4 + 5 + 6 = 7 + 8

Friendly runsums

2 + 3 + 4

4 + 5

4

Are there any more?

21

1 + 2 + 3 + 4 + 5 + 6 = 6 + 7 + 8

9 = 2+3+4 = 4+5

21 = 1+2+3+4+5+6 = 6+7+8

30 = 6+7+8+9 = 9+10+11

42 = 3+4+5+6+7+8+9 = 9+10+11+12

65 = 2+3+4+5+6+7+8+9+10+11 = 11+12+13+14+15

70 = 12+13+14+15+16 = 16+17+18+19



99, 105, 117, 133, 135, 154, 175, 180, ...

If we omit the common number, the new series of sums is:

5,15,21,33,54,54,85,90,100, ... (see Sloane's A110702)

Balancing Numbers

both runsums consist of more than one number one of the two runsums begins at 1

2 + 3 + 4 = 4 + 5

4

1

6

1 + 2 + 3 + 4 + 5 + 6 = 6 + 7 + 8

n + 1

2

1 + 2 + 3 + 4 + 5 + 6 = 6 + (6+1) + (6+ 2 )

n

r

n2 = (n + r)(n + r + 1) 2 r = √(8 n2+1) – 2n – 1 2

n2

8 n2 + 1

B(0) = 1 B(1) = 6 B(2) = 35 B(i) = 6 B(i–1) – B(i–2) for i > 2

1, 6, 35, 204, 1189, 6930, 40391, 235416, ...

In the same way that the Fibonacci Numbers have a Binet Formula which explicitly gives Fib(n) in terms of n, the balancing numbers have the formula:

B(n) = Gn+1 – gn+1 where G = 3 + √8, g = 3 – √8 G – g

G

1/g

1,4

–6,6

6 + 1 −6 + 1 6 + 1 −6 + 1 ...

1

Neighbourly Runsums

15: 4 + 5 + 6 = 7 + 8

27

2 + 3 + 4 + 5 + 6 + 7 = 8 + 9 + 10 = 27

The ordered sequence of sums with two neighbouring runsums is:



15 = 4+5+6 = 7+8

27 = 2+3+4+5+6+7 = 8+9+10

30 = 4+5+6+7+8 = 9+10+11

42 = 9+10+11+12 = 13+14+15

75 = 3+4+5+6+7+8+9+10+11+12 = 13+14+15+16+17

90 = 16+17+18+19+20 = 21+22+23+24



105,135,147,165 ...

A Friends and Neighbours Runsum Calculator

C A L C U L A T O R Italic indicates an optional input a..b=b..c a..b=(b+1)..c with a =

up to and sum

up to a..b=b..c

a..b=(b+1)..c with b =

up to Clear



R E S U L T S : Runsums Friend & Neighbours

Polyomino Runsums

For instance, let's make each odd number into a zigzag shape of squares and then we can use the fact that the sum of the first n odd numbers is n2 to make an n×n shape jigsaw:

1 + (1 + 2 ) = 1 + 3 = 4 = 22

(1 + 2) + (1 + 2 + 3 ) = 1 + 3 + 5 = 9 = 32

(1 + 2 + 3) + (1 + 2 + 3 + 4 ) = 1 + 3 + 5 + 7 = 16 = 42 ...

For instance, let's make each odd number into a zigzag shape of squares and then we can use the fact that the sum of the first n odd numbers is nto make an n×n shape jigsaw:1 + (1 + 2 ) = 1 + 3 = 4 = 2(1 + 2) + (1 + 2 + 3 ) = 1 + 3 + 5 = 9 = 3(1 + 2 + 3) + (1 + 2 + 3 + 4 ) = 1 + 3 + 5 + 7 = 16 = 4...

T(n) = 1 + 2 + ... + n = n (n + 1) 2 . Because one of n or n+1 is even, or, equivalently :

if n is even then T(n) can make the rectangle (n/2) ×(n+1);

if n is odd, then (n+1) is even so n × (n+1)/2 are the sides of the rectangle. Livio also uses this and uses the same zigzag shapes for each number from 1 to n to form a rectangle with the first n numbers:



Because the runsums starting at 1 are the triangle numbers T(n), we have the formulaThis means we can make each triangle number 1 + 2 + ... + n into a rectangle too! Why?Livio also uses this and uses the same zigzag shapes for each number from 1 to n to form a rectangle with the first n numbers:

For instance, the 12 shapes made from 5 connected squares are the 12 pentominoes shown here on the right. A polyomino shape may be rotated or turned over (making its mirror image) but they are all the same polyomino. Since the 12 shapes each have 5 squares making a total of 60 squares, we can try to arrange these into a 6×10 rectangle or a 5×12 rectangle or a 3×20 rectangle. There are many ways to solve each of these three puzzles and if you make cut out the 12 shapes it makes a nice challenge to see how long it takes you to find one solution for each of these.