Van Der Waerden Numbers

Warning: mysqli::__construct(): (HY000/2002): No such file or directory in /home/boincadm/projects/vdwnumbers/html/inc/ on line 39

Warning: mysqli::query(): Couldn't fetch mysqli in /home/boincadm/projects/vdwnumbers/html/inc/ on line 63
Database Error

Warning: mysqli::escape_string(): Couldn't fetch mysqli in /home/boincadm/projects/vdwnumbers/html/inc/ on line 227
log in

Warning: mysqli::query(): Couldn't fetch mysqli in /home/boincadm/projects/vdwnumbers/html/inc/ on line 63
Database Error

Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/boincadm/projects/vdwnumbers/html/inc/ on line 51


The sequence of colors BRRBBRRB (where B is blue and R is red) does not have an evenly spaced subsequence of length 3 that are the same color. However, if you add a B to the end, you get BRRBBRRBB, which has the same color B in positions 1,5, and 9 which are evenly spaced 4 apart. If you add an R to the end, you get BRRBBRRBR, which has R at position 3, 6, and 9. In fact, with only two colors, there is no sequence of length 9 of Bs and Rs that does not have a subsequence of 3 evenly spaced of the same color. Van der Waerden's Theorem states that for any number of colors r and length k, a long enough sequence always has an evenly spaced subsequence of the same color. The smallest length guaranteed to have an evenly spaced subsequence is called the Van Der Waerden Number and is written W(k,r). For example, W(3,2)=9. This project is to find better lower bounds for Van Der Waerden Numbers by finding sequences like BRRBBRRB. See a table of the results so far below.

Here is how the program works. Take a prime number n (shown in parentheses on the table) and a primitive root of that number. For example, let n equal 11. See that W(4,2)-length 4, 2 colors has 11 in parentheses. Let's use the primitive root 2. 2 is a primitive root of 11 because its powers up to 2^10 [2,4,8,16,32,64,128,256,512,1024] modulo 11 (the remainder when dividing by 11) are all distinct and equal [2,4,8,5,10,9,7,3,6,1] which we color red, blue, red, blue. Now all we have to do is reorder this is sequence, getting us [1,2,3,4,5,6,7,8,9,10]. We can add the color 11, which should be blue. Rabung proved that under certain conditions we can concatenate 3 more copies of this 11-term sequence while avoiding 4 evenly spaced of the same color. We can add a 34th term, so we will. The existence of this sequence of 34 proves that W(4,2) is more than 34.

2 colors3 colors4 colors5 colors6 colors7 colors8 colors9 colors10 colors
Length 39
Length 435
Length 5178
Length 61,132
Length 7>5,819,030,419
Length 8>11,495
Length 9>41,265
Length 10>8,728,546,132
Length 11>193,941
Length 12>638,727
Length 13>11,638,062,565
Length 14>12,607,901,190
Length 15>13,577,740,079
Length 16>14,547,578,836
Length 17>15,517,417,457
Length 18>16,486,437,498
Length 19
Length 20
Length 21
Length 22
Length 23
Length 24
Length 25
This project has begun using the cyclic zipper method with code shared by Rabung and Lotts. Results with the cyclic zipper method are shown above. Z=zipped once, ZZ=zipped twice. > means the actual number is unknown but we know it is more than that number. The numbers in parentheses are the primes we used to find the sequences.

Code and content created by Daniel Monroe © 2021.