login
A397311
a(1) = 0; for n > 1, a(n) is the least integer > a(n-1) such that distinct multisets of 10 terms from a(1),...,a(n) have distinct sums.
0
0, 1, 11, 111, 616, 4448, 23614, 100943, 430134, 1529622, 5273780, 18181274
OFFSET
1,3
COMMENTS
This is a greedy B_10 sequence beginning with 0.
EXAMPLE
a(3)!=10 because 10+0+0+0+0+0+0+0+0+0 = 1+1+1+1+1+1+1+1+1+1.
PROG
(Python)
import itertools
def greedy_bh(h, start):
terms, sums = [], set()
def test_candidate(candidate):
new_sums = []
for copies in range(1, h + 1):
for combo in itertools.combinations_with_replacement(terms, h - copies):
candidate_sum = sum(combo) + candidate * copies
# No need to check candidate_sum against the other values in
# `new_sums`: any collision between two new sums, one with r
# copies and one with s (r < s), reduces to a new-vs-old
# collision at s-r copies, which is caught earlier.
if candidate_sum in sums:
return None
new_sums.append(candidate_sum)
return new_sums
for candidate in itertools.count(start):
if (candidate_sums := test_candidate(candidate)) is not None:
yield candidate
terms.append(candidate)
sums.update(candidate_sums)
a397311_list = list(itertools.islice(greedy_bh(10, 0), 5))
KEYWORD
nonn,more,new
AUTHOR
Adam Reichert, Jun 20 2026
STATUS
approved