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.
-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
Offset: 1
Keywords
Examples
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).
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.
Comments