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
Michael S. Branicky, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Feb 13 2024
EXTENSIONS
a(16) and beyond from Michael S. Branicky, Feb 14 2024
STATUS
approved