Summer-Time Twos

I wondered how often the digits of n2 appeared in sum(n1,n2). For example:

17 → 117 = sum(9,17)
20200 = sum(5,20); 204,4; 207,3; 209,2 (c=4)

As I looked at higher n2, I found that the 2-views continued:

63 → 363 = sum(58,63); 638,53; 1638,28; 1763,23; 1863,18 (c=5)
88 → 1288 = sum(73,88); 2788,48; 2881,46; 3388,33; 3880,9; 3888,8 (c=6)
20020009 = sum(14,200); 20022,13; 20034,12; 20045,11; 20055,10; 20064,9;
200
72,8; 20079,7; 20085,6; 20090,5; 20094,4; 20097,3; 20099,2 (c=13)
558 → 39558 = sum(483,558); 55833,448; 95583,348; 105558,318; 125580,247; 126558,243; 143558,158; 152558,83; 155583,28; 155808,18; 155825,17; 155841,16; 155856,15; 155870,14; 155883,13; 155895,12 (c=16)
20002000010 = sum(45,2000); 2000054,44; 2000097,43; 2000139,42; 2000180,41; 2000220,40; 2000259,39; 2000297,38; 2000334,37; 2000370,36; 2000405,35; 2000439,34; 2000472,33; 2000504,32; 2000535,31; 2000565,30;
2000594,29; 2000622,28; 2000649,27; 2000675,26; 2000700,25; 2000724,24; 2000747,23; 2000769,22; 2000790,21; 2000810,20; 2000829,19; 2000847,18; 2000864,17; 2000880,16; 2000895,15; 2000909,14; 2000922,13; 2000934,
12; 2000945,11; 2000955,10; 2000964,9; 2000972,8; 2000979,7; 2000985,6; 2000990,5; 2000994,4; 2000997,3; 2000999,2 (c=44)

But what about other bases?

Base 9

15 in b9 → 115 = sum(5,15) (n=14 in b10) (c=1)
18 in b9 → 118 = sum(11,17); 180,1 (n=17 in b10) (c=2)
20 in b9 → 203 = sum(4,18); 206,3; 208,2 (n=18 in b10) (c=3)
45 in b9 → 445 = sum(32,41); 745,25; 1045,15; 1145,5 (n=41 in b10) (c=4)
55 in b9 → 555 = sum(41,50); 1055,35; 1355,25; 1555,15; 1655,5 (n=50 in b10) (c=5)
65 in b9 → 665 = sum(50,59); 1265,45; 1665,35; 2065,25; 2265,15; 2365,5 (n=59 in b10) (c=6)
75 in b9 → 775 = sum(59,68); 1475,55; 2075,45; 2475,35; 2750,26; 2775,25; 3075,15; 3175,5 (n=68 in b10) (c=8)
85 in b9 → 885 = sum(68,77); 1685,65; 2385,55; 2885,45; 3385,35; 3685,25; 3853,17; 3885,15; 4085,5 (n=77 in b10) (c=9)
200 in b9 → 20003 = sum(13,162); 20016,13; 20028,12; 20040,11; 20050,10; 20058,8; 20066,7; 20073,6; 20078,5; 20083,4; 20086,3; 20088,2 (n=162 in b10) (c=12)
415 in b9 → 13415 = sum(311,338); 25415,345; 36415,315; 41525,302; 46415,275; 55415,245; 63415,215; 64155,212; 70415,175; 75415,145; 80415,115; 83415,75; 85415,45; 86415,15 (n=338 in b10) (c=14)
[…]
2000 in b9 → 2000028 = sum(38,1458); 2000070,41; 2000120,40; 2000158,38; 2000206,37; 2000243,36; 2000278,35; 2000323,34; 2000356,33; 2000388,32; 2000430,31; 2000460,30; 2000488,28; 2000526,27; 2000553,26; 2000578,25; 2000613,24; 2000636,23; 2000658,22; 2000680,21; 2000710,20; 2000728,18; 2000746,17; 2000763,16; 2000778,15; 2000803,14; 2000816,13; 2000828,12; 2000840,11; 2000850,10; 2000858,8; 2000866,7; 2000873,6; 2000878,5; 2000883,4; 2000886,3; 2000888,2 (n=1458 in b10) (c=37)


Base 11

16 in b11 → 116 = sum(6,16) (n=17 in b10) (c=1)
20 in b11 → 201 = sum(5,22); 205,4; 208,3; 20A,2 (n=22 in b10) (c=4)
56 in b11 → 556 = sum(50,61); 956,36; 1156,26; 1356,16; 1456,6 (n=61 in b10) (c=5)
66 in b11 → 666 = sum(61,72); 1066,46; 1466,36; 1669,2A; 1766,26; 1966,16; 1A66,6 (n=72 in b10) (c=7)
86 in b11 → 886 = sum(83,94); 1486,66; 1A86,56; 2486,46; 2886,36; 3086,26; 3286,16; 3386,6 (n=94 in b10) (c=8)
96 in b11 → 996 = sum(94,105); 1696,76; 2296,66; 2896,56; 3296,46; 3696,36; 3996,26; 4096,16; 4196,6 (n=105 in b10) (c=9)
A6 in b11 → AA6 = sum(105,116); 18A6,86; 25A6,76; 31A6,66; 37A6,56; 41A6,46; 45A6,36; 48A6,26; 4AA6,16; 50A6,6 (n=116 in b10) (c=10)
200 in b11 → 1200A = sum(156,242); 20001,15; 20015,14; 20028,13; 2003A,12; 20050,11; 20060,10; 2006A,A; 20078,9; 20085,8; 20091,7; 20097,6; 200A1,5; 200A5,4; 200A8,3; 200AA,2 (n=242 in b10) (c=16)
[…]
A66 in b11 → 1AA66 = sum(1260,1282); A1A66,966; 109A66,946; 182A66,866; 198A66,846; 23A666,786; 253A66,766; 267A66,746; 314A66,666; 326A66,646; 375A66,566; 385A66,546; 416A66,466; 424A66,446; 457A66,366; 463A66,346; 46A666,326; 488A66,266; 492A66,246; 4A6666,186; 4A9A66,166; 501A66,146; 50AA66,66; 510A66,46 (n=1282 in b10) (c=24)
2000 in b11 → 2000005 = sum(52,2662); 2000051,47; 2000097,46; 2000131,45; 2000175,44; 2000208,43; 200024A,42; 2000290,41; 2000320,40; 200035A,3A; 2000398,39; 2000425,38; 2000461,37; 2000497,36; 2000521,35; 2000555,34; 2000588,33; 200060A,32; 2000640,31; 2000670,30; 200069A,2A; 2000718,29; 2000745,28; 2000771,27; 2000797,26; 2000811,25; 2000835,24; 2000858,23; 200087A,22; 20008A0,21; 2000910,20; 200092A,1A; 2000948,19; 2000965,18; 2000981,17; 2000997,16; 2000A01,15; 2000A15,14; 2000A28,13; 2000A3A,12; 2000A50,11; 2000A60,10; 2000A6A,A; 2000A78,9; 2000A85,8; 2000A91,7; 2000A97,6; 2000AA1,5; 2000AA5,4; 2000AA8,3; 2000AAA,2 (n=2662 in b10) (c=51)


Base 3

12 in b3 → 112 = sum(2,12); 120,1 (n=5 in b10) (c=2)
20 in b3 → 120 = sum(4,6); 200,10; 202,2 (n=6 in b10) (c=3)
122 in b3 → 10122 = sum(11,17); 11122,22; 11220,21; 12122,2; 12200,1 (n=17 in b10) (c=5)
1212 in b3 → 121212 = sum(41,50); 1001212,1012; 1101212,212; 1112120,200; 1121212,112; 1201212,12 (n=50 in b10) (c=6)
1222 in b3 → 122222 = sum(44,53); 1101222,1002; 1111222,222; 1112220,221; 1212222,102; 1221222,2; 1222000,1 (n=53 in b10) (c=7)
2000 in b3 → 1112000 = sum(28,54); 1120000,1000; 2000020,21; 2000110,20; 2000122,12; 2000210,11; 2000220,10; 2000222,2 (n=54 in b10) (c=8)
[…]
20000 in b3 → 111120000 = sum(82,162); 111200000,10000; 200000010,111; 200000120,110; 200000222,102; 200001100,101; 200001200,100; 200001222,22; 200002020,21; 200002110,20; 200002122,12; 200002210,11; 200002220,10; 200002222,2 (n=162 in b10) (c=14)


Base 4

13 in b4 → 130 = sum(1,13) (n=7 in b10) (c=1)
20 in b4 → 201 = sum(3,8); 203,2 (n=8 in b10) (c=2)
200 in b4 → 20001 = sum(6,32); 20012,11; 20022,10; 20031,3; 20033,2 (n=32 in b10) (c=5)
2000 in b4 → 2000021 = sum(11,128); 2000103,22; 2000130,21; 2000210,20; 2000223,13; 2000301,12; 2000312,11; 2000322,10; 2000331,3; 2000333,2 (n=128 in b10) (c=10)
20000 in b4 → 200000003 = sum(23,512); 200000121,112; 200000232,111; 200001002,110; 200001111,103; 200001213,102; 200001320,101; 200002020,100; 200002113,33; 200002211,32; 200002302,31; 200002332,30; 200003021,23; 200003103,22; 200003130,21; 200003210,20; 200003223,13; 200003301,12; 200003312,11; 200003322,10; 200003331,3; 200003333,2 (n=512 in b10) (c=22)


Base 8

17 in b8 → 170 = sum(1,17) (n=15 in b10) (c=1)
20 in b8 → 202 = sum(4,16); 205,3; 207,2 (n=16 in b10) (c=3)
200 in b8 → 20011 = sum(11,128); 20023,12; 20034,11; 20044,10; 20053,7; 20061,6; 20066,5; 20072,4; 20075,3; 20077,2 (n=128 in b10) (c=10)
2000 in b8 → 2000020 = sum(32,1024); 2000057,37; 2000115,36; 2000152,35; 2000206,34; 2000241,33; 2000273,32; 2000324,31; 2000354,30; 2000403,27; 2000431,26; 2000456,25; 2000502,24; 2000525,23; 2000547,22; 200057
0,21; 2000610,20; 2000627,17; 2000645,16; 2000662,15; 2000676,14; 2000711,13; 2000723,12; 2000734,11; 2000744,10; 2000753,7; 2000761,6; 2000766,5; 2000772,4; 2000775,3; 2000777,2 (n=1024 in b10) (c=31)


Base 16

1F in b16 → 1F0 = sum(1,1F) (n=31 in b10) (c=1)
20 in b16 → 201 = sum(6,32); 206,5; 20A,4; 20D,3; 20F,2 (n=32 in b10) (c=5)
200 in b16 → 20003 = sum(23,512); 20019,16; 2002E,15; 20042,14; 20055,13; 20067,12; 20078,11; 20088,10; 20097,F; 200A5,E; 200B2,D; 200BE,C; 200C9,B; 200D3,A; 200DC,9; 200E4,8; 200EB,7; 200F1,6; 20
0
F6,5; 200FA,4; 200FD,3; 200FF,2 (n=512 in b10) (c=22)
[…]
EE4 in b16 → 42EE4A = sum(961,EE4); 6EE413,16; 6EE428,15; 6EE43C,14; 6EE44F,13; 6EE461,12; 6EE472,11; 6EE482,10; 6EE491,F; 6EE49F,E; 6EE4AC,D; 6EE4B8,C; 6EE4C3,B; 6EE4CD,A; 6EE4D6,9; 6EE4DE,8; 6EE4E5,7; 6EE4EB,6; 6EE4F0,5; 6EE4F4,4; 6EE4F7,3; 6EE4F9,2; 6EE4FA,1 (n=3812 in b10) (c=23)
2000 in b16 → 2000001 = sum(5B,2000); 200005B,5A; 20000B4,59; 200010C,58; 2000163,57; 20001B9,56; 200020E,55; 2000262,54; 20002B5,53; 2000307,52; 2000358,51; 20003A8,50; 20003F7,4F; 2000445,4E; 2000492,4D; 20004DE,4C; 2000529,4B; 2000573,4A; 20005BC,49; 2000604,48; 200064B,47; 2000691,46; 20006D6,45; 200071A,44; 200075D,43; 200079F,42; 20007E0,41; 2000820,40; 200085F,3F; 200089D,3E; 20008DA,3D; 2000916,3C; 2000951,3B; 200098B,3A; 20009C4,39; 20009FC,38; 2000A33,37; 2000A69,36; 2000A9E,35; 2000AD2,34; 2000B05,33; 2000B37,32; 2000B68,31; 2000B98,30; 2000BC7,2F; 2000BF5,2E; 2000C22,2D; 2000C4E,2C; 2000C79,2B; 2000CA3,2A; 2000CCC,29; 2000CF4,28; 2000D1B,27; 2000D41,26; 2000D66,25; 2000D8A,24; 2000DAD,23; 2000DCF,22; 2000DF0,21; 2000E10,20; 2000E2F,1F; 2000E4D,1E; 2000E6A,1D; 2000E86,1C; 2000EA1,1B; 2000EBB,1A; 2000ED4,19; 2000EEC,18; 2000F03,17; 2000F19,16; 2000F2E,15; 2000F42,14; 2000F55,13; 2000F67,12; 2000F78,11; 2000F88,10; 2000F97,F; 2000FA5,E; 2000FB2,D; 2000FBE,C; 2000FC9,B; 2000FD3,A; 2000FDC,9; 2000FE4,8; 2000FEB,7; 2000FF1,6; 2000FF6,5; 2000FFA,4; 2000FFD,3; 2000FFF,2 (n=8192 in b10) (c=90)


Previously Pre-Posted (Please Peruse)

Summer-Time Hues
Summer-Climb Views
Summult-Time Hues

Summult-Time Hues

sum(3,6) = 3 * 6 = 18
3 * 2.3 = 2.3^2
sum(15,35) = 15 * 35 = 525
3.5 * 5.7 = 3.5^2.7
sum(85,204) = 85 * 204 = 17340
5.17 * 2^2.3.17 = 2^2.3.5.17^2
sum(493,1189) = 493 * 1189 = 586177
17.29 * 29.41 = 17.29^2.41
sum(2871,6930) = 2871 * 6930 = 19896030
3^2.11.29 * 2.3^2.5.7.11 = 2.3^4.5.7.11^2.29
sum(16731,40391) = 16731 * 40391 = 675781821
3^2.11.13^2 * 13^2.239 = 3^2.11.13^4.239
[…]


Elsewhere Other-Accessible

1, 18, 525, 17340, 586177, 19896030, 675781821, 22956120408, 779829016225, 26491211221770, 899921240562957, 30570830315362260, 1038508305678375841, 35278711540581704598, 1198437683944896688125, 40711602541832856049200, 1382996048733983114022337 — A011906 at the Online Encyclopedia of Integer Sequences

Summer Sets (and Truncated Triangulars)

Here is the sequence of triangular numbers, created by summing consecutive integers from 1 (i.e., 1+2+3+4+5…):


1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431, 1485, 1540, 1596, 1653, 1711, 1770, 1830, 1891, 1953, 2016, 2080, 2145, 2211, 2278, 2346, 2415, 2485, 2556, 2628, 2701, 2775, 2850, 2926, 3003, 3081, 3160, 3240, 3321, 3403, 3486, 3570, 3655, 3741, 3828, 3916, 4005, 4095, 4186, 4278, 4371, 4465, 4560, 4656, 4753, 4851, 4950, 5050, 5151, 5253, 5356, 5460, 5565, 5671, 5778, 5886, 5995...

And here is a sequence of truncated triangulars, created by summing consecutive integers from 15 (i.e., 15+16+17+18+19…):


15, 31, 48, 66, 85, 105, 126, 148, 171, 195, 220, 246, 273, 301, 330, 360, 391, 423, 456, 490, 525, 561, 598, 636, 675, 715, 756, 798, 841, 885, 930, 976, 1023, 1071, 1120, 1170, 1221, 1273, 1326, 1380, 1435, 1491, 1548, 1606, 1665, 1725, 1786, 1848, 1911, 1975, 2040, 2106, 2173, 2241, 2310, 2380, 2451, 2523, 2596, 2670, 2745, 2821, 2898, 2976, 3055, 3135, 3216, 3298, 3381, 3465, 3550, 3636, 3723, 3811, 3900, 3990, 4081, 4173, 4266, 4360, 4455, 4551, 4648, 4746, 4845, 4945, 5046, 5148, 5251, 5355, 5460, 5566, 5673, 5781...

It’s obvious that the sequences are different at each successive step: 1 ≠ 15, 3 ≠ 31, 6 ≠ 48, 10 ≠ 66, 21 ≠ 85, and so on. But seven numbers occur in both sequences: 15, 66, 105, 171, 561, 1326 and 5460. And that’s it — 7 is the 14-th entry in A309507 at the Encyclopedia of Integer Sequences:


0, 1, 1, 1, 3, 3, 1, 2, 5, 3, 3, 3, 3, 7, 3, 1, 5, 5, 3, 7, 7, 3, 3, 5, 5, 7, 7, 3, 7, 7, 1, 3, 7, 7, 11, 5, 3, 7, 7, 3, 7, 7, 3, 11, 11, 3, 3, 5, 8, 11, 7, 3, 7, 15, 7, 7, 7, 3, 7, 7, 3, 11, 5, 3, 15, 7, 3, 7, 15, 7, 5, 5, 3, 11, 11, 7, 15, 7, 3, 9, 9, 3, 7 — A309507

I decided to take create graphs of shared numbers in compared sequences like this. In the 135×135 grid below, the brightness of the squares corresponds to the count of shared numbers in the sequence-pair sum(x..x+n) and sum(y..y+n), where x and y are the coordinates of each individual square. I think the grid looks like a city of skyscrapers bisected by a highway:

Count of shared numbers in sequence-pairs sum(x..x+n) and sum(y..y+n)


Note that the bright white diagonal in the grid corresponds to the sequence-pairs where x = y. Because the sequences are identical in each pair, the count of shared numbers is infinite. The grid is symmetrically reflected along the diagonal because, for example, the sequence-pair for x=12, y=43, where sum(12..12+n) is compared with sum(43..43+n), corresponds to the sequence pair for x=43, y=12, where sum(43..43+n) is compared with sum(12..12+n). The scale of brightness runs from 0 (black) to 255 (full white) and increases by 32 for each shared number in the sequence. Obviously, then, the brightness can’t increase indefinitely and some maximally bright squares will represent sequence-pairs that have different counts of shared pairs.

Now try altering the size of the step in brightness. You get grids in which the width of the central strip increases (smaller step) or decreases (bigger step). Here are grids for steps for 1, 2, 4, 8, 16, 32 and 64 (I’ve removed the bright x=y diagonal for the first few grids, because it’s too prominent against duller shades):

Brightness-step = 1


Brightness-step = 2


Brightness-step = 4


Brightness-step = 8


Brightness-step = 16


Brightness-step = 32


Brightness-step = 63


Brightness-step = 1, 2, 4, 8, 16, 32, 63 (animated)


I’m a Beweaver

Here are some examples of what I call woven sums for sum(n1..n2), where the digits of n1 are interwoven with the digits of n2:

1599 = sum(19..59) = 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56
2716 = sum(21..76)
159999 = sum(199..599)
275865 = sum(256..785)
289155 = sum(295..815)
15050747 = sum(1004..5577)
15058974 = sum(1087..5594)
15999999 = sum(1999..5999)
39035479 = sum(3057..9349)


In other words, the digits of n1 occupy digit-positions 1,3,5… and the digits of n2 occupy dig-pos 2,4,6…

But I can’t find woven sums where the digits of n2 are interwoven with the digits of n1, i.e. the digits of n2 occupy dig-pos 1,3,5… and the digits of n1 occupy dig-pos 2,4,6… Except when n1 has fewer digits than n2, e.g. 210 = sum(1..20).


Elsewhere Other-Accessible…

Nuts for Numbers — a look at numbers like 2772 = sum(22..77) and 10470075 = sum(1075..4700).

Spiral Artefact #2

Why stop at primes? Those are the numbers the Ulam spiral is usually used for. You get a grid of square blocks, then move outward from the middle of the grid in a spiral, counting as you go. If the count matches a prime, you fill the block in. The first block is 1. Not filled. The second block is 2, which is prime. So the block is filled. The third block is 3, which is prime. Filled again. And so on. In the end, the Ulam spiral for primes looks like this:

The Ulam spiral of prime numbers


But why stop at primes? If you change the fill-test, you get different patterns. I’ve recently tried a test based on how many ways a number can be represented as the sum of consecutive integers. For example, 5, 208 and 536 can be represented in only one way:

5 = 2+3
208 = 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22
536 = sum(26..41) = 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41


Let’s use “runsum” to mean a sum of consecutive integers. If the function runsum(n) returns the count of runsums for n, then runsum(5) = runsum(208) = runsum(536) = 1. Here are spirals for runsum(n) = 1:

A spiral for runsum(n) = 1, i.e. numbers that are the sum of consecutive integers in only one way


runsum(n) = 1 (higher resolution)


runsum(n) = 1 (higher resolution still)


Now try runsum(n) = 2, i.e. numbers that are the sum of consecutive integers in exactly two ways:

A spiral for runsum(n) = 2


runsum(n) = 2 (hi-res #1)


runsum(n) = 2 (hi-res #2)


runsum(n) = 2 (hi-res #3)


Why do most of the numbers fall on a diagonal? I don’t know, but I know that the diagonal represents square numbers:

9 = sum(4..5) = sum(2..4)
25 = sum(12..13) = sum(3..7)
36 = sum(11..13) = sum(1..8)
49 = sum(24..25) = sum(4..10)


Now try runsum(n) = 3:

A spiral for runsum(n) = 3


runsum(n) = 3 (hi-res)


It’s a densely packed spiral, unlike the spiral for runsum(n) = 4:

A spiral for runsum(n) = 4


runsum(n) = 4 (hi-res)


Like the spiral for runsum(n) = 2, the numbers are disproportionately falling on the diagonal of square numbers:

81 = 9^2 = sum(40..41) = sum(26..28) = sum(11..16) = sum(5..13)
324 = 18^2 = sum(107..109) = sum(37..44) = sum(32..40) = sum(2..25)
2500 = 50^2 = sum(498..502) = sum(309..316) = sum(88..112) = sum(43..82)


Here are spirals for runsum(n) = 5:

A spiral for runsum(n) = 5 (note patterns in green)


runsum(n) = 5 (hi-res #1)


runsum(n) = 5 (hi-res #2)


There are two interesting patterns in the spiral, marked in green above and enlarged below:

Pattern #1 in spiral for runsum(n) = 5


Pattern #2 in spiral for runsum(n) = 5


Are the patterns merely artefacts or does one or both represent something mathematically significant? I don’t know.

More spirals:

A spiral for runsum(n) = 6


A spiral for runsum(n) = 7


runsum(n) = 7 (hi-res)


A spiral for runsum(n) = 8


runsum(n) = 8 (hi-res #1)


runsum(n) = 8 (hi-res #2)


Numbers in the spiral for runsum(n) = 8 are again falling disproportionately on the diagonal of square numbers. Here’s one of those squares:

441 = 21^2 = sum(220..221) = sum(146..148) = sum(71..76) = sum(60..66) = sum(45..53) = sum(25..38) = sum(16..33) = sum(11..31)


Previously Pre-Posted…

Spiral Artefact #1 — a look at patterns in spirals with different tests

Nuts for Numbers

I was looking at palindromes created by sums of consecutive integers. And I came across this beautiful result:

2772 = sum(22..77)


2772 = 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77

You could call 2772 a nutty sum, because 77 is held inside 22 like a kernel inside a nutshell. Here some more nutty sums, sum(n1..n2), where n2 is a kernel in the shell of n1:

1599 = sum(19..59)
2772 = sum(22..77)
22113 = sum(23..211)
159999 = sum(199..599)
277103 = sum(203..771)
277722 = sum(222..777)
267786 = sum(266..778)
279777 = sum(277..797)
1152217 = sum(117..1522)
1152549 = sum(149..1525)
1152767 = sum(167..1527)
4296336 = sum(436..2963)
5330303 = sum(503..3303)
6235866 = sum(626..3586)
8418316 = sum(816..4183)
10470075 = sum(1075..4700)
11492217 = sum(1117..4922)
13052736 = sum(1306..5273)
13538277 = sum(1377..5382)
14557920 = sum(1420..5579)
15999999 = sum(1999..5999)
25175286 = sum(2516..7528)
26777425 = sum(2625..7774)
27777222 = sum(2222..7777)
37949065 = sum(3765..9490)
53103195 = sum(535..10319)
111497301 = sum(1101..14973)

Of course, you can go the other way and find nutty sums where sum(n1..n2) produces n1 as a kernel inside the shell of n2:

147 = sum(4..17)
210 = sum(1..20)
12056 = sum(20..156)
13467 = sum(34..167)
22797 = sum(79..227)
22849 = sum(84..229)
26136 = sum(61..236)
1145520 = sum(145..1520)
1208568 = sum(208..1568)
1334667 = sum(334..1667)
1540836 = sum(540..1836)
1931590 = sum(315..1990)
2041462 = sum(414..2062)
2041863 = sum(418..2063)
2158083 = sum(158..2083)
2244132 = sum(244..2132)
2135549 = sum(554..2139)
2349027 = sum(902..2347)
2883558 = sum(883..2558)
2989637 = sum(989..2637)

When you look at nutty sums in other bases, you’ll find that the number “210” is always triangular and always a nutty sum in bases > 2:

210 = sum(1..20) in b3 → 21 = sum(1..6) in b10
210 = sum(1..20) in b4 → 36 = sum(1..8) in b10
210 = sum(1..20) in b5 → 55 = sum(1..10) in b10
210 = sum(1..20) in b6 → 78 = sum(1..12) in b10
210 = sum(1..20) in b7 → 105 = sum(1..14) in b10
210 = sum(1..20) in b8 → 136 = sum(1..16) in b10
210 = sum(1..20) in b9 → 171 = sum(1..18) in b10
210 = sum(1..20) in b10
210 = sum(1..20) in b11 → 253 = sum(1..22) in b10
210 = sum(1..20) in b12 → 300 = sum(1..24) in b10
210 = sum(1..20) in b13 → 351 = sum(1..26) in b10
210 = sum(1..20) in b14 → 406 = sum(1..28) in b10
210 = sum(1..20) in b15 → 465 = sum(1..30) in b10
210 = sum(1..20) in b16 → 528 = sum(1..32) in b10
210 = sum(1..20) in b17 → 595 = sum(1..34) in b10
210 = sum(1..20) in b18 → 666 = sum(1..36) in b10
210 = sum(1..20) in b19 → 741 = sum(1..38) in b10
210 = sum(1..20) in b20 → 820 = sum(1..40) in b10
[…]

Why is 210 always a nutty sum like that? Because the formula for sum(n1..n2) is (n1*n2) * (n2-n1+1) / 2. In all bases > 2, the sum of 1 to 20 (where 20 = 2 * b) is therefore:

(1+20) * (20-1+1) / 2 = 21 * 20 / 2 = 21 * 10 = 210

And here are nutty sums of both kinds (n1 inside n2 and n2 inside n1) for base 8:

210 = sum(1..20) in b8 → 136 = sum(1..16) in b10
12653 = sum(26..153) → 5547 = sum(22..107)
23711 = sum(71..231) → 10185 = sum(57..153)
2022323 = sum(223..2023) → 533715 = sum(147..1043)
2032472 = sum(247..2032) → 537914 = sum(167..1050)
2271564 = sum(715..2264) → 619380 = sum(461..1204)
2307422 = sum(742..2302) → 626450 = sum(482..1218)
125265253 = sum(2526..15253) → 22375083 = sum(1366..6827)


3246710 = sum(310..2467) in b8 → 871880 = sum(200..1335)
in b10
5326512 = sum(512..3265) → 1420618 = sum(330..1717)
15540671 = sum(1571..5406) → 3588537 = sum(889..2822)
21625720 = sum(2120..6257) → 4664272 = sum(1104..3247)

And for base 9:

125 = sum(2..15) in b9 → 104 = sum(2..14) in b10
210 = sum(1..20) → 171 = sum(1..18)
12858 = sum(28..158) → 8720 = sum(26..134)
1128462 = sum(128..1462) → 609824 = sum(107..1109)
1288588 = sum(288..1588) → 708344 = sum(242..1214)
1475745 = sum(475..1745) → 817817 = sum(392..1337)
2010707 = sum(107..2007) → 1070017 = sum(88..1465)
2034446 = sum(344..2046) → 1085847 = sum(283..1500)
2040258 = sum(402..2058) → 1089341 = sum(326..1511)
2063410 = sum(341..2060) → 1104768 = sum(280..1512)
2215115 = sum(215..2115) → 1191281 = sum(176..1553)
2255505 = sum(555..2205) → 1217840 = sum(455..1625)
2475275 = sum(475..2275) → 1348880 = sum(392..1688)
2735455 = sum(735..2455) → 1499927 = sum(599..1832)


1555 = sum(15..55) in b9 → 1184 = sum(14..50) in b10
155858 = sum(158..558) → 96200 = sum(134..458)
1148181 = sum(181..1481) → 622720 = sum(154..1126)
2211313 = sum(213..2113) → 1188525 = sum(174..1551)
2211747 = sum(247..2117) → 1188880 = sum(205..1555)
6358585 = sum(685..3585) → 3404912 = sum(563..2669)
7037453 = sum(703..3745) → 3745245 = sum(570..2795)
7385484 = sum(784..3854) → 3953767 = sum(643..2884)
13518167 = sum(1367..5181) → 6685072 = sum(1033..3799)
15588588 = sum(1588..5588) → 7794224 = sum(1214..4130)
17603404 = sum(1704..6034) → 8859865 = sum(1300..4405)
26750767 = sum(2667..7507) → 13201360 = sum(2005..5515)


Post-Performative Post-Scriptum…

Viz ’s Mr Logic would be a fan of nutty sums. And unlike real nuts, they wouldn’t prove fatal:

Mr Logic Goes Nuts (strip from Viz comic)

(click for full-size)

Primal Stream

It’s obvious when you think about: an even number can never be the sum of two consecutive integers. Conversely, an odd number (except 1) is always the sum of two consecutive integers: 3 = 1 + 2; 5 = 2 + 3; 7 = 3 + 4; 9 = 4 + 5; and so on. The sum of three consecutive integers can be either odd or even: 6 = 1 + 2 + 3; 9 = 2 + 3 + 4. The sum of four consecutive integers must always be even: 1 + 2 + 3 + 4 = 10; 2 + 3 + 4 + 5 = 14. And so on.

But notice that 9 is the sum of consecutive integers in two different ways: 9 = 4 + 5 = 2 + 3 + 4. Having spotted that, I decided to look for numbers that were the sums of consecutive integers in the most different ways. These are the first few:

3 = 1 + 2 (number of sums = 1)
9 = 2 + 3 + 4 = 4 + 5 (s = 2)
15 = 1 + 2 + 3 + 4 + 5 = 4 + 5 + 6 = 8 + 7 = (s = 3)
45 (s = 5)
105 (s = 7)
225 (s = 8)
315 (s = 11)
945 (s = 15)
1575 (s = 17)
2835 (s = 19)
3465 (s = 23)
10395 (s = 31)


It was interesting that the number of different consecutive-integer sums for n was most often a prime number. Next I looked for the sequence at the Online Encyclopedia of Integer Sequences and discovered something that I hadn’t suspected:

A053624 Highly composite odd numbers: where d(n) increases to a record.

1, 3, 9, 15, 45, 105, 225, 315, 945, 1575, 2835, 3465, 10395, 17325, 31185, 45045, 121275, 135135, 225225, 405405, 675675, 1576575, 2027025, 2297295, 3828825, 6891885, 11486475, 26801775, 34459425, 43648605, 72747675, 130945815 — A053624 at OEIS

The notes add that the sequence is “Also least number k such that the number of partitions of k into consecutive integers is a record. For example, 45 = 22+23 = 14+15+16 = 7+8+9+10+11 = 5+6+7+8+9+10 = 1+2+3+4+5+6+7+8+9, six such partitions, but all smaller terms have fewer such partitions (15 has four).” When you don’t count the number n itself as a partition of n, you get 3 partitions for 15, i.e. consecutive integers sum to 15 in 3 different ways, so s = 3. I looked at more values for s and found that the stream of primes continued to flow:

3 → s = 1
9 = 3^2 → s = 2 (prime)
15 = 3 * 5 → s = 3 (prime)
45 = 3^2 * 5 → s = 5 (prime)
105 = 3 * 5 * 7 → s = 7 (prime)
225 = 3^2 * 5^2 → s = 8 = 2^3
315 = 3^2 * 5 * 7 → s = 11 (prime)
945 = 3^3 * 5 * 7 → s = 15 = 3 * 5
1575 = 3^2 * 5^2 * 7 → s = 17 (prime)
2835 = 3^4 * 5 * 7 → s = 19 (prime)
3465 = 3^2 * 5 * 7 * 11 → s = 23 (prime)
10395 = 3^3 * 5 * 7 * 11 → s = 31 (prime)
17325 = 3^2 * 5^2 * 7 * 11 → s = 35 = 5 * 7
31185 = 3^4 * 5 * 7 * 11 → s = 39 = 3 * 13
45045 = 3^2 * 5 * 7 * 11 * 13 → s = 47 (prime)
121275 = 3^2 * 5^2 * 7^2 * 11 → s = 53 (prime)
135135 = 3^3 * 5 * 7 * 11 * 13 → s = 63 = 3^2 * 7
225225 = 3^2 * 5^2 * 7 * 11 * 13 → s = 71 (prime)
405405 = 3^4 * 5 * 7 * 11 * 13 → s = 79 (prime)
675675 = 3^3 * 5^2 * 7 * 11 * 13 → s = 95 = 5 * 19
1576575 = 3^2 * 5^2 * 7^2 * 11 * 13 → s = 107 (prime)
2027025 = 3^4 * 5^2 * 7 * 11 * 13 → s = 119 = 7 * 17
2297295 = 3^3 * 5 * 7 * 11 * 13 * 17 → s = 127 (prime)
3828825 = 3^2 * 5^2 * 7 * 11 * 13 * 17 → s = 143 = 11 * 13
6891885 = 3^4 * 5 * 7 * 11 * 13 * 17 → s = 159 = 3 * 53
11486475 = 3^3 * 5^2 * 7 * 11 * 13 * 17 → s = 191 (prime)
26801775 = 3^2 * 5^2 * 7^2 * 11 * 13 * 17 → s = 215 = 5 * 43
34459425 = 3^4 * 5^2 * 7 * 11 * 13 * 17 → s = 239 (prime)
43648605 = 3^3 * 5 * 7 * 11 * 13 * 17 * 19 → s = 255 = 3 * 5 * 17
72747675 = 3^2 * 5^2 * 7 * 11 * 13 * 17 * 19 → s = 287 = 7 * 41
130945815 = 3^4 * 5 * 7 * 11 * 13 * 17 * 19 → s = 319 = 11 * 29


I can’t spot any way of predicting when n will yield a primal s, but I like the way that a simple question took an unexpected turn. When a number sets a record for the number of different ways it can be the sum of consecutive integers, that number will also be a highly composite odd number.