# Summer Set Sequence

I wondered what would happen if you added to a set of numbers, (a, b, c), the first number that wasn’t equal to the sum of any subset of the numbers: a + b, a + c, c + b, a + b + c. If the set begins with 1, the first number not equal to any subset of (1) is 2. So the set becomes (1, 2). 3 = 1 + 2, so 3 is not added. But 4 is added, making the set (1, 2, 4). The sequence of additions goes like this:

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536…

It’s the powers of 2, because some subset of the powers of 2 < 2^p will equal any number from 1 to (2^p)-1, therefore the first addition will be 2^p = the cumulative sum + 1:

1 (cumulative sum=1), 2 (cs=3), 4 (cs=7), 8 (cs=15), 16 (cs=31), 32 (cs=63), 64 (cs=127), 128 (cs=255), 256 (cs=511), 512 (cs=1023), 1024 (cs=2047), 2048 (cs=4095), 4096 (cs=8191), 8192 (cs=16383), 16384 (cs=32767), 32768 (cs=65535)…

If you seed the sequence with the set (2), the first addition is 3, but after that the powers of 2 re-appear:

2, 3, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536…

It becomes more complicated if the sequence is seeded with the set (3):

3, 4, 5, 6, 16, 17, 49, 50, 148, 149, 445, 446, 1336, 1337, 4009, 4010, 12028, 12029, 36085, 36086…

You can predict the pattern by looking at the cumulative sums again:

3, 4, 5, 6 (cumulative sum=18), 16, 17 (cs=51), 49, 50 (cs=150), 148, 149 (cs=447), 445, 446 (cs=1338), 1336, 1337 (cs=4011), 4009, 4010 (cs=12030), 12028, 12029 (cs=36087), 36085, 36086 (cs=108258)…

The sequence begins with a block of four consecutive numbers, followed by separate blocks of two consecutive numbers. The first number in each 2-block is predicted by the cumulative sum of the last number in the previous block, according to the formula n = cumulative sum – seed + 1. When the seed is 3, n = cs-3+1.

If the seed is 4, the sequences goes like this:

4, 5, 6, 7, 8, 27, 28, 29, 111, 112, 113, 447, 448, 449, 1791, 1792, 1793, 7167, 7168, 7169…

Now the sequence begins with a block of five consecutive numbers, followed by separate blocks of three consecutive numbers. The formula is n = cs-4+1:

4, 5, 6, 7, 8 (cumulative sum=30), 27, 28, 29 (cs=114), 111, 112, 113 (cs=450), 447, 448, 449 (cs=1794), 1791, 1792, 1793 (cs=7170), 7167, 7168, 7169 (cs=28674)…

And here’s the sequence seeded with (5):

5, 6, 7, 8, 9, 10, 41, 42, 43, 44, 211, 212, 213, 214, 1061, 1062, 1063, 1064, 5311, 5312, 5313, 5314…

5, 6, 7, 8, 9, 10 (cs=45), 41, 42, 43, 44 (cs=215), 211, 212, 213, 214 (cs=1065), 1061, 1062, 1063, 1064 (cs=5315), 5311, 5312, 5313, 5314 (cs=26565)…

This site uses Akismet to reduce spam. Learn how your comment data is processed.