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

zak seidov zakseidov at yahoo.com
Mon Mar 22 16:25:58 CET 2010

```One particular case
with -(1+...+m)+(m+1+...+n)=0
leads to equation 2m(m+1)=n(n+1).

Solution to this equation  is given by recurrency in A001652:
a(k) = 6*a(k - 1) - a(k - 2) + 2  (here a = n or m).

First values of {n,m}:
{n,m}
{3,2}: 1+2=3
{20,14}: 1+...+14=15+...+20
{119,84}: 1+...85=86+...+119
{696,492}
{4059,2870}
{23660,16730}

Just an observation,
Zak

----- Original Message ----
From: Ron Hardin <rhhardin at att.net>
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Sent: Mon, March 22, 2010 4:32:04 AM
Subject: [seqfan]  Sum +-j +-(j+1) +-(j+2) ... +-i equals zero.

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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 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)

_______________________________________________

Seqfan Mailing list - http://list.seqfan.eu/

```