# [seqfan] Sum +-j +-(j+1) +-(j+2) ... +-i equals zero.

Ron Hardin rhhardin at att.net
Mon Mar 22 03:32:04 CET 2010

```When can the sum of plus or minus consecutive integers be zero?

I get a weird table, entry i,,j zero iff the sum of +-j +-(j+1) +-(j+2) ... +-i equals zero for some choice of signs.

01  1
02  1 1
03  0 1 1
04  0 1 1 1
05  1 0 1 1 1
06  1 0 0 1 1 1
07  0 1 1 0 1 1 1
08  0 1 1 0 0 1 1 1
09  1 0 0 1 1 0 1 1 1
10  1 0 0 1 1 1 0 1 1 1
11  0 1 1 0 0 1 1 0 1 1 1
12  0 1 1 0 0 1 1 1 0 1 1 1
13  1 0 0 1 1 0 0 1 1 0 1 1 1
14  1 0 0 1 1 0 0 1 1 1 0 1 1 1
15  0 1 1 0 0 1 1 0 0 1 1 0 1 1 1
16  0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1
17  1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
18  1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1
19  0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
20  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1
21  1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
22  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1
23  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
24  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1
25  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
26  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
27  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
28  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
29  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
30  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
31  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
32  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
33  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
34  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
35  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1
36  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
37  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1
38  1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1
39  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1
40  0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1

A formula would be nice (that was the original plan - I don't have to check for zero if the sum can't be zero.

The weirdness is the slow replacement of 2x2 zero blocks by a single diagonal zero, encroaching
leftwards from the main diagonal.

rhhardin at mindspring.com
rhhardin at att.net (either)

```