Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #29 May 24 2021 00:09:01
%S 1,-2,4,-3,-5,11,-6,-7,8,9,10,12,13,-14,-16,-15,-17,18,19,-20,21,22,
%T 23,24,25,-26,-27,-34,-28,-29,-30,31,32,33,35,-36,37,38,39,40,41,-42,
%U -43,-44,-57,-45,-46,-47,48,49,-50,51,52,53,-55,54,56,58,59,60,61,-62,-63,-64,-65,-83,-66,-67,-68,-69,70,71
%N Successive sums of successive terms produce the successive natural numbers (see the Comments section).
%C The 1st term sums up to 1;
%C the next 2 terms sum up to 2;
%C the next 3 terms sum up to 3;
%C the next 4 terms sum up to 4;
%C ... the next k terms sum up to k.
%H Carole Dubois, <a href="/A338161/b338161.txt">Table of n, a(n) for n = 1..406</a>
%H Carole Dubois, <a href="/A338161/a338161_1.txt">Program (Python)</a>
%e 1 = 1 (1 term);
%e 2 = - 2 + 4 (2 terms);
%e 3 = - 3 - 5 + 11 (3 terms);
%e 4 = - 6 - 7 + 8 + 9 (4 terms);
%e 5 = 10 + 12 + 13 - 14 - 16 (5 terms);
%e 6 = - 15 - 17 + 18 + 19 - 20 + 21 (6 terms); etc.
%e How are the plus and minus signs split between the terms to get the above six equations? Here is the method -- with an example:
%e 1) no absolute value of any term can be present twice or more in the sequence;
%e 2) to start a new equation, always use the set of smallest absolute values not yet used; say, for the above 5-term equation, that they are a, b, c, d and e;
%e 3) the set of unused values for a, b, c, d and e is here 10, 12, 13, 14, 15;
%e 4) try all the possible mix of values and signs to find one or more solutions (the try 5 = 10 + 12 - 13 - 14 + 15, for instance, doesn't work as we would get 5 = 10);
%e 5) if no such mix leads to a solution (which is the case here), add 1 to the biggest integer of the values' set and try again;
%e 6) the above set would then become 10, 12, 13, 14, 16 -- and a quick computer search gives the solution 5 = 10 + 12 + 13 - 14 - 16;
%e 7) had we found more than one solution, we would have kept the lexicographically earliest one (-10 comes before +10);
%e 8) if a new mix doesn't lead to a solution, add again 1 to the biggest integer of the values' set and try again; etc.
%o (Python) # see Link section
%Y Cf. A330903.
%K sign
%O 1,2
%A _Eric Angelini_ and _Carole Dubois_, Oct 14 2020