login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326936 Consider an empty list L, and for k = 1, 2, ...: if L contains a pair of consecutive terms summing to k, then let (u, v) be the first such pair: replace the two terms u and v in L with a single term k and set a(u) = -k and a(v) = +k, otherwise append k to L. 6

%I #26 Feb 28 2020 01:38:42

%S -3,3,-7,7,-11,11,-18,-17,17,-22,18,22,-27,27,-31,31,35,-35,-39,39,

%T -44,-49,44,68,-51,51,49,-57,57,-62,-70,62,-67,67,-84,-73,73,-78,70,

%U 78,-83,83,-88,-68,88,-93,93,-98,84,98,-108,-105,105,-109,109,-114,108

%N Consider an empty list L, and for k = 1, 2, ...: if L contains a pair of consecutive terms summing to k, then let (u, v) be the first such pair: replace the two terms u and v in L with a single term k and set a(u) = -k and a(v) = +k, otherwise append k to L.

%C The sequence is well defined: sketch of proof, by contradiction:

%C - if the sequence were not well defined, then we would have some m > 0 such that L(1) = m for any k >= m,

%C - to prevent L(1) from being merged to L(2) forever, L(2) must always be merged to L(3) for some L(3) < m

%C - this can happen only finitely many times as the number of terms < m in L strictly decreases at each such merge,

%C - so at some time, L(1) < L(3) and L(1) merges with L(2) at k = L(1) + L(2), and then L(1) > m, a contradiction, QED.

%C The given procedure leads to a kind of infinite binary tree T:

%C - each node has a positive integer value,

%C - the node with value n has as parent the node with value abs(a(n)) and as sibling the node with value abs(a(n)) - n (see A328654 for the sibling of a node),

%C - each node has finitely many descendant nodes,

%C - each node has infinitely many ancestor nodes, so the tree is not rooted (see A328653 for the ancestors of 1),

%C - two nodes have always a common ancestor,

%C - see illustration in Links section.

%H Rémy Sigrist, <a href="/A326936/b326936.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A326936/a326936.png">Illustration of the first terms</a>

%H Rémy Sigrist, <a href="/A326936/a326936.txt">C++ program for A326936</a>

%F If a(m) + a(n) = 0, then abs(a(m)) = abs(a(n)) = m + n.

%e For k = 1:

%e - we set L = (1).

%e For k = 2:

%e - we set L = (1, 2).

%e For k = 3:

%e - the first two terms, (1, 2), sum to 3,

%e - so a(1) = -3 and a(2) = +3,

%e - we set L = (3).

%e For k = 4:

%e - we set L = (3, 4).

%e For k = 5:

%e - we set L = (3, 4, 5).

%e For k = 6:

%e - we set L = (3, 4, 5, 6).

%e For k = 7:

%e - the first two terms, (3, 4), sum to 7,

%e - so a(3) = -1 and a(4) = +7,

%e - we set L = (7, 5, 6).

%o (C++) See Links section.

%Y Cf. A328653, A328654.

%K sign

%O 1,1

%A _Rémy Sigrist_, Oct 22 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 01:36 EDT 2024. Contains 371264 sequences. (Running on oeis4.)