The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. 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. 5
 -3, 3, -7, 7, -11, 11, -18, -17, 17, -22, 18, 22, -27, 27, -31, 31, 35, -35, -39, 39, -44, -49, 44, 68, -51, 51, 49, -57, 57, -62, -70, 62, -67, 67, -84, -73, 73, -78, 70, 78, -83, 83, -88, -68, 88, -93, 93, -98, 84, 98, -108, -105, 105, -109, 109, -114, 108 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The sequence is well defined: sketch of proof, by contradiction: - if the sequence were not well defined, then we would have some m > 0 such that L(1) = m for any k >= m, - 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 - this can happen only finitely many times as the number of terms < m in L strictly decreases at each such merge, - 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. The given procedure leads to a kind of infinite binary tree T: - each node has a positive integer value, - 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), - each node has finitely many descendant nodes, - each node has infinitely many ancestor nodes, so the tree is not rooted (see A328653 for the ancestors of 1), - two nodes have always a common ancestor, - see illustration in Links section. LINKS Rémy Sigrist, Table of n, a(n) for n = 1..10000 Rémy Sigrist, Illustration of the first terms Rémy Sigrist, C++ program for A326936 FORMULA If a(m) + a(n) = 0, then abs(a(m)) = abs(a(n)) = m + n. EXAMPLE For k = 1: - we set L = (1). For k = 2: - we set L = (1, 2). For k = 3: - the first two terms, (1, 2), sum to 3, - so a(1) = -3 and a(2) = +3, - we set L = (3). For k = 4: - we set L = (3, 4). For k = 5: - we set L = (3, 4, 5). For k = 6: - we set L = (3, 4, 5, 6). For k = 7: - the first two terms, (3, 4), sum to 7, - so a(3) = -1 and a(4) = +7, - we set L = (7, 5, 6). PROG (C++) See Links section. CROSSREFS Cf. A328653, A328654. Sequence in context: A109579 A109580 A168269 * A336416 A128508 A083743 Adjacent sequences:  A326933 A326934 A326935 * A326937 A326938 A326939 KEYWORD sign AUTHOR Rémy Sigrist, Oct 22 2019 STATUS approved

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

Last modified September 17 21:46 EDT 2021. Contains 347489 sequences. (Running on oeis4.)