The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A370264 Lexicographically earliest sequence such that each subsequence enclosed by a pair of equal values, including the endpoints, has a unique sum. 2
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, 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, 6, 7, 14, 16, 6, 2, 4, 8, 12, 3, 9, 10, 11, 5, 7, 13, 1, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Note that we are considering the sums of the terms between every pair of equal values, not just those that appear consecutively.
LINKS
EXAMPLE
a(2)=1 creates the pair [a(1), a(2)] = [1, 1], which gives the unique sum of 2.
a(4)=1 creates two unique sums: [1,2,1] = sum of 4 and [1,1,2,1] = sum of 5.
a(8)=3 creates one unique sum: [3,2,1,3] = sum of 9.
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
s, a = set(), []
while True:
an, allnew = 0, False
while not allnew:
allnew, an, sn = True, an+1, set()
for i in range(len(a)):
if an == a[i]:
t = sum(a[i+1:]) + 2*an
if t in s or t in sn: allnew = False; break
sn.add(t)
yield an; a.append(an); s |= sn
print(list(islice(agen(), 81))) # Michael S. Branicky, Feb 14 2024
CROSSREFS
Cf. A370264 (excluding endpoints), A366493, A366624, A366631, A366625.
Sequence in context: A115624 A076291 A275015 * A211189 A194968 A194980
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Feb 13 2024
EXTENSIONS
a(16) and beyond from Michael S. Branicky, Feb 14 2024
STATUS
approved

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 June 7 09:09 EDT 2024. Contains 373161 sequences. (Running on oeis4.)