|Colours of Numbers|
|by Karl Palmen|
I discovered a way of colouring the natural numbers that I have found very fascinating. I use following eight colours: black, red, green, yellow, blue, magenta, cyan and white. (Before printing this page on a colour printer see the note at the bottom.)
It started years ago when I realised that those numbers that can be expressed as the sum of just two squares (1, 2, 4, 5, 8, 9, 10, 13 etc.) contain all their multiplication products (e.g., 2x5=10). This arises as a consequence of De Moivre's theorem in complex numbers. I became quite fascinated by these numbers and worked out a large number of them. I soon suspected a relationship between such numbers and the remainders of their prime factors divided by 4.
From the geometry of the complex plane I discovered a similar set of numbers. These are the numbers expressable as the sum of two squares and their geometric mean (1, 3, 4, 7, 9, 12, 13 etc.). These too contain their multiplication products (e.g., 3x4=12). I soon suspected a relationship between such numbers and the remainders of their prime factors divided by 3.
These considerations eventually inspired me to find my way of colouring numbers. The numbers that are the sum of two squares are either black or red and I believe that all numbers expressible as the sum of two squares and their geometric mean are either black or green.
The Rules for Colouring NumbersThe colour of each natural number can be determined by the following rules:
- When you multiply two numbers together, the colour of the resulting product is determined by the colours of the two numbers.
- When you multiply two numbers of the same colour, the resulting product is black.
- When you multiply a red number by a green number, the resulting product is yellow.
- When you multiply a red number by a blue number, the resulting product is magenta.
- When you multiply a green number by a blue number, the resulting product is cyan.
- When you multiply a red number, a green number and a blue number together, the resulting product is white.
- The colour of a prime number is determined by its remainder from dividing by 12 as follows:
- 1 - Black
- 2,5 - Red
- 3,7 - Green
- 11 - Blue
Fascinating Facts and Trivia
I believe the following are true.
Multiplying ColoursWhen you multiply two numbers together, the colour of the resulting product is determined by the colours of the two numbers as in the table below:
X black red green yellow blue magenta cyan white black black red green yellow blue magenta cyan white red red black yellow green magenta blue white cyan green green yellow black red cyan white blue magenta yellow yellow green red black white cyan magenta blue blue blue magenta cyan white black red green yellow magenta magenta blue white cyan red black yellow green cyan cyan white blue magenta green yellow black red white white cyan magenta blue yellow green red black
First 10 Numbers of Each Colour
The first 10 numbers of each colour are
- Black - 1, 4, 9, 10, 13, 16, 21, 25, 34, 36
- Red - 2, 5, 8, 17, 18, 20, 26, 29, 32, 41
- Green - 3, 7, 12, 19, 27, 28, 30, 31, 39, 43
- Yellow - 6, 14, 15, 24, 35, 38, 51, 54, 56, 60
- Blue - 11, 23, 44, 47, 59, 71, 83, 92, 99, 107
- Magenta - 22, 46, 55, 88, 94, 115, 118, 142, 166, 184
- Cyan - 33, 69, 77, 132, 141, 161, 177, 209, 213, 276
- White - 66, 138, 154, 165, 264, 282, 322, 345, 354, 385
Colours of the first 225 numbersThe numbers are here arranged in an anticlockwise spiral starting from 1 at the center.
(This image was produced by the Prime Number Spiral program.)
Numbers Not Divisible by SixNumbers of the form 3n+1 are black, white, green or magenta.
Numbers of the form 3n+2 are one of the other four colours.
Numbers of the form 4n+1 are black, white, red or cyan.
Numbers of the form 4n+3 are one of the other four colours.
The above two, imply that any odd number not divisible by 3 is either the same colour it would be if prime or the complementary colour.
These theorems are useful for proving much of what follows.
Square NumbersAll square numbers are black, because the product of any two numbers of the same colour is black. In particular, 1 is black.
Every number that is the sum of two squares a.a + b.b is either black or red.
If neither a nor b is divisible by 3, the number is red.
If either a or b is divisible by 3, but not both, the number is black.
If both are divisible by 3, the number is divisible by 9, the quotient, has the same colour and is is a sum of two squares.
A black or a red prime number is the sum of two squares.
Every number that is the sum of two squares and their geometic mean a.a + a.b + b.b is either black or green.
A black or a green prime number is the sum of two squares and their geometric mean.
Single Colour PolynomialsThe polynomial k.x.x is the same colour for all integers x. Computation has suggested other such polynomials:
- 4.x.x + 3.m.m, where m is odd are all green.
- 9.x.x + m.m, where m is not divisible by 3 are all black.
- 9.x.x + 6.x + 2, are all red.
- 12.x.x + m.m where m is odd are all black.
- 12.x.x - 1 is for non-zero x blue.
The propositions in the previous section imply most of these.
1 and 10Multiplying any number by 1 or any other black number leaves the colour of that number unchanged. Ten is black, hence adding a 0 to the end of a number leaves its colour unchanged.
PairsA maximum of two consecutive numbers may have the same colour. Any such pair must have a number divisible by 3 and its position in the pair is determined by the colour.
The first pair of each colour is as follows:
It is possible for two pairs of the same colour to be separated by just one number. This first happens for the first two green pairs. It is also possible for two pairs of different colours to run in succession. This first happens with 84, 85 - Black and 86, 87 - Yellow.
- 9, 10 - Black
- 17, 18 - Red
- 27, 28 - Green
- 14, 15 - Yellow
- 230, 231 - Blue
- 414, 415 - Magenta
- 329, 330 - Cyan
- 1704, 1705 - White
Arithmetic ProgressionsIf three numbers of the same colour are in arithmetic progression, their common difference must be divisible by 3. Examples are 2, 5, 8 - Red and 16, 25, 34 - Black.
If four or more numbers of the same colour are in arithmetic progression, their common difference must be divisible by 12. Examples are 1, 13, 25, 37, ... 373 - Black and 11, 71, 131, 191, 251, 311 - Blue.
Mersenne PrimesAll Mersenne primes 3, 7, 31, 127, ... are green. The largest known prime is probably a Mersenne prime and therefore green.
Fermat NumbersAll Fermat numbers 5, 17, 257, 65537, ..., except 3 are red.
Perfect NumbersAll known perfect numbers 28, 496, 8128, ... except 6 are green. Any odd perfect number must be either black or red.
Numbers 26, 27, 28, 29, 30, 31, 32These 7 consecutive numbers are red and green. They form a symetrical pattern around the first two green pairs.
66 and Other White Numbers66 is the first white number.
It is the last number of a different colour to all lower numbers.
Like all white numbers, it has factors of all other colours.
Each of its factors are the first number of its colour.
White numbers are quite rare, but gruadually become less rare for larger numbers. We have two consecutive white years coming up (2001, 2002) the next white year is then 2065.
A white number must have at least three prime factors. It has, including both itself and 1, an equal number of factors of each colour. E.g., for 2002:
Factors of a White Number (2002)
The number of factors that a white number has, including itself and 1, is a multiple of 8.
- 1, 13 - Black
- 2, 26 - Red
- 7, 91 - Green
- 14, 182 - Yellow
- 11, 143 - Blue
- 22, 286 - Magenta
- 77, 1001 - Cyan
- 154, 2002 - White
Numbers 122, 123, 124, 125, 126, 127, 128These seven consecutive numbers go red, yellow, green repeatedly and so do, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Any sequence of a 3-colour cycle, has a maximum of three odd numbers and so is limited to seven numbers. It also may only have two numbers divisible by 3.
Numbers 136, 137, 138, 139, 140, 141, 142, 143These eight consecutive numbers are of all eight colours. Since 144 is a square number it is black and hence 137, 138, 139, 140, 141, 142, 143, 144 are also eight consecutive numbers of all eight colours.
Numbers 225, 226, 227, 228, 229, 230, 231, 232These eight consecutive numbers are of just two colours. If you add 288 to these numbers, you get 513, 514, 515, 516, 517, 518, 519, 520 in which all the black numbers remain black and all the blue numbers become yellow.
Any two-colour sequence of at least four consecutive numbers must have its two colours multiplying to either blue or yellow. Such a sequence can not have more than nine numbers in it and if it does have nine numbers, one colour must be either black or white and the other colour either blue or yellow.
Colours of FractionsIf a/b is a whole number, it has the same colour as ab. Rational numbers can be coloured by making this (i.e., a/b same colour as ab) apply to fractions too. Then 1/n has the same colour as n. Many of the above propositions do not apply to fractions.
The following are examples of colours of fractions:
The square root of 2 can not have a colour, because if it did, the colour of its square would be black, contradicting the fact that it is red (2 is red). Hence the square root of 2 is irrational.
- Black - 1/10, 1/9, 1/4, 2/5, 3/7, 4/9, 7/12, 5/8, 9/10
- Red - 1/8, 1/5, 2/9, 1/2, 5/9, 4/5, 6/7, 8/9
- Green - 1/12, 1/7, 1/3, 3/10, 4/7, 7/10, 3/4, 7/9, 5/6
- Yellow - 1/6, 2/7, 3/8, 5/12, 3/5, 2/3, 5/7, 7/8
- Blue - 1/11, 4/11, 9/11, 10/11
- Magenta - 2/11, 5/11, 8/11
- Cyan - 3/11, 7/11, 11/12
- White - 6/11
- Is there a general algorithm for calculating the colour of a given number, that is decisively more efficient, than factorising into prime factors?
- Find nine consecutive whole numbers of only two colours.
- Find eight consecutive whole numbers of all eight colours, other than 136-143 or 137-144.
- Find a number three less than a power of four and of a different colour than that power of four. The same challenge but with a power of two has been met, by finding
- 8,189 = 19 * 431 cyan 8,192 = 2^13 red
- 33,554,429 = 479 * 70,051 cyan 33,554,432 = 2^25 red
- Does every non-negative real number have a sequence of black numbers that converges to it? If so, is there an algorithm to construct such a sequence?
- Find another fascinating fact.
This page may be printed on a black-and-white printer, which, not surprisingly, will not show the colours. If it is printed on a colour printer then the text in white will not be printed. A version of this page more suitable for printing on a colour printer is here.
Last modified: 2001-01-23
Karl Palmen's Calendars Prime Number Spiral Factorizer Hermetic Systems Home Page