This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A326936 #26 Feb 28 2020 01:38:42 %S A326936 -3,3,-7,7,-11,11,-18,-17,17,-22,18,22,-27,27,-31,31,35,-35,-39,39, %T A326936 -44,-49,44,68,-51,51,49,-57,57,-62,-70,62,-67,67,-84,-73,73,-78,70, %U A326936 78,-83,83,-88,-68,88,-93,93,-98,84,98,-108,-105,105,-109,109,-114,108 %N 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. %C A326936 The sequence is well defined: sketch of proof, by contradiction: %C A326936 - if the sequence were not well defined, then we would have some m > 0 such that L(1) = m for any k >= m, %C A326936 - 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 A326936 - this can happen only finitely many times as the number of terms < m in L strictly decreases at each such merge, %C A326936 - 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 A326936 The given procedure leads to a kind of infinite binary tree T: %C A326936 - each node has a positive integer value, %C A326936 - 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 A326936 - each node has finitely many descendant nodes, %C A326936 - each node has infinitely many ancestor nodes, so the tree is not rooted (see A328653 for the ancestors of 1), %C A326936 - two nodes have always a common ancestor, %C A326936 - see illustration in Links section. %H A326936 Rémy Sigrist, <a href="/A326936/b326936.txt">Table of n, a(n) for n = 1..10000</a> %H A326936 Rémy Sigrist, <a href="/A326936/a326936.png">Illustration of the first terms</a> %H A326936 Rémy Sigrist, <a href="/A326936/a326936.txt">C++ program for A326936</a> %F A326936 If a(m) + a(n) = 0, then abs(a(m)) = abs(a(n)) = m + n. %e A326936 For k = 1: %e A326936 - we set L = (1). %e A326936 For k = 2: %e A326936 - we set L = (1, 2). %e A326936 For k = 3: %e A326936 - the first two terms, (1, 2), sum to 3, %e A326936 - so a(1) = -3 and a(2) = +3, %e A326936 - we set L = (3). %e A326936 For k = 4: %e A326936 - we set L = (3, 4). %e A326936 For k = 5: %e A326936 - we set L = (3, 4, 5). %e A326936 For k = 6: %e A326936 - we set L = (3, 4, 5, 6). %e A326936 For k = 7: %e A326936 - the first two terms, (3, 4), sum to 7, %e A326936 - so a(3) = -1 and a(4) = +7, %e A326936 - we set L = (7, 5, 6). %o A326936 (C++) See Links section. %Y A326936 Cf. A328653, A328654. %K A326936 sign %O A326936 1,1 %A A326936 _Rémy Sigrist_, Oct 22 2019