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 A370264 #11 Feb 17 2024 12:41:39 %S A370264 1,1,2,1,3,2,1,3,3,4,2,1,3,5,4,2,6,7,1,3,5,4,7,6,2,8,1,5,6,9,9,3,1,10, %T A370264 2,8,4,1,10,6,9,3,2,5,11,12,4,3,10,7,8,2,13,11,12,4,13,1,14,3,9,15,5, %U A370264 6,7,14,16,6,2,4,8,12,3,9,10,11,5,7,13,1,14 %N A370264 Lexicographically earliest sequence such that each subsequence enclosed by a pair of equal values, including the endpoints, has a unique sum. %C A370264 Note that we are considering the sums of the terms between every pair of equal values, not just those that appear consecutively. %H A370264 Michael S. Branicky, <a href="/A370264/b370264.txt">Table of n, a(n) for n = 1..10000</a> %e A370264 a(2)=1 creates the pair [a(1), a(2)] = [1, 1], which gives the unique sum of 2. %e A370264 a(4)=1 creates two unique sums: [1,2,1] = sum of 4 and [1,1,2,1] = sum of 5. %e A370264 a(8)=3 creates one unique sum: [3,2,1,3] = sum of 9. %o A370264 (Python) %o A370264 from itertools import islice %o A370264 def agen(): # generator of terms %o A370264 s, a = set(), [] %o A370264 while True: %o A370264 an, allnew = 0, False %o A370264 while not allnew: %o A370264 allnew, an, sn = True, an+1, set() %o A370264 for i in range(len(a)): %o A370264 if an == a[i]: %o A370264 t = sum(a[i+1:]) + 2*an %o A370264 if t in s or t in sn: allnew = False; break %o A370264 sn.add(t) %o A370264 yield an; a.append(an); s |= sn %o A370264 print(list(islice(agen(), 81))) # _Michael S. Branicky_, Feb 14 2024 %Y A370264 Cf. A370264 (excluding endpoints), A366493, A366624, A366631, A366625. %K A370264 nonn %O A370264 1,3 %A A370264 _Neal Gersh Tolunsky_, Feb 13 2024 %E A370264 a(16) and beyond from _Michael S. Branicky_, Feb 14 2024