Color each of the numbers 1 through n either red or blue such that if a+b=c then a, b and c are not all the same color. The addends are distinct.
For example with n=6 the sequence
rbrbrb does not work because 2+4=6 but are all blue.
Whereas rbrbbr does work.
What is the largest value of n for which such a sequence exists?
Note: Since the colors can be swapped, make the number 1 red.
Add a third color (green.) What is the new maximum value of n?
(In reply to re: Sloane says
With 3 colors the QuickBasic program finished in under a second.
But with 4 colors, even Visual Basic (which runs faster) has been running for a while and still hasn't produced a string over 52.
Forget 5 colors. And it's no wonder Sloane doesn't go any farther than that; it must have taken a lot of computing power for 5 colors.
Posted by Charlie
on 2009-10-15 12:15:53