OFFSET
1,6
COMMENTS
A B_n sequence is a sequence such that all sums a(x_1) + a(x_2) + ... + a(x_n) are distinct for 1 <= x_1 <= x_2 <= ... <= x_n. Analogous to A347570 except that here the B_n sequences start from a(1) = 0.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..242
Eric Weisstein's World of Mathematics, B2 Sequence.
FORMULA
a(n) = A347570(n)-1.
EXAMPLE
Table begins:
n\k | 1 2 3 4 5 6 7 8 9
----+---------------------------------------------------
1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, ...
2 | 0, 1, 3, 7, 12, 20, 30, 44, 65, ...
3 | 0, 1, 4, 13, 32, 71, 124, 218, 375, ...
4 | 0, 1, 5, 21, 55, 153, 368, 856, 1424, ...
5 | 0, 1, 6, 31, 108, 366, 926, 2286, 5733, ...
6 | 0, 1, 7, 43, 154, 668, 2214, 6876, 16864, ...
7 | 0, 1, 8, 57, 256, 1153, 4181, 14180, 47381, ...
8 | 0, 1, 9, 73, 333, 1822, 8043, 28296, 102042, ...
9 | 0, 1, 10, 91, 500, 3119, 13818, 59174, 211135, ...
PROG
(Python)
from itertools import count, islice, combinations_with_replacement
def A365515_gen(): # generator of terms
asets, alists, klist = [set()], [[]], [0]
while True:
for i in range(len(klist)-1, -1, -1):
kstart, alist, aset = klist[i], alists[i], asets[i]
for k in count(kstart):
bset = set()
for d in combinations_with_replacement(alist+[k], i):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alists[i].append(k)
klist[i] = k+1
asets[i].update(bset)
break
klist.append(0)
asets.append(set())
alists.append([])
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Chai Wah Wu, Sep 07 2023
STATUS
approved