cp's OEIS Frontend

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.

A365302 a(n) is the smallest nonnegative integer such that the sum of any six ordered terms a(k), k<=n (repetitions allowed), is unique.

This page as a plain text file.
%I A365302 #44 Mar 28 2024 04:13:51
%S A365302 0,1,7,43,154,668,2214,6876,16864,41970,94710,202027,429733,889207,
%T A365302 1549511,3238700,5053317,8502061,15583775,25070899,40588284,63604514
%N A365302 a(n) is the smallest nonnegative integer such that the sum of any six ordered terms a(k), k<=n (repetitions allowed), is unique.
%C A365302 This is the greedy B_6 sequence.
%H A365302 J. Cilleruelo and J Jimenez-Urroz, <a href="https://doi.org/10.1112/S0025579300015758">B_h[g] sequences</a>, Mathematika (47) 2000, pp. 109-115.
%H A365302 Melvyn B. Nathanson, <a href="https://arxiv.org/abs/2310.14426">The third positive element in the greedy B_h-set</a>, arXiv:2310.14426 [math.NT], 2023.
%H A365302 Melvyn B. Nathanson and Kevin O'Bryant, <a href="https://arxiv.org/abs/2311.14021">The fourth positive element in the greedy B_h-set</a>, arXiv:2311.14021 [math.NT], 2023.
%H A365302 Kevin O'Bryant, <a href="https://doi.org/10.37236/32">A complete annotated bibliography of work related to Sidon sequences</a>, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
%e A365302 a(5) != 50 because 50+1+1+1+1+0 = 43+7+1+1+1+1.
%o A365302 (Python)
%o A365302 def GreedyBh(h, seed, stopat):
%o A365302     A = [set() for _ in range(h+1)]
%o A365302     A[1] = set(seed)    # A[i] will hold the i-fold sumset
%o A365302     for j in range(2,h+1): # {2,...,h}
%o A365302         for x in A[1]:
%o A365302             A[j].update([x+y for y in A[j-1]])
%o A365302     w = max(A[1])+1
%o A365302     while w <= stopat:
%o A365302         wgood = True
%o A365302         for k in range(1,h):
%o A365302             if wgood:
%o A365302                 for j in range(k+1,h+1):
%o A365302                     if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
%o A365302                         wgood = False
%o A365302         if wgood:
%o A365302             A[1].add(w)
%o A365302             for k in range(2,h+1): # update A[k]
%o A365302                 for j in range(1,k):
%o A365302                     A[k].update([(k-j)*w + x for x in A[j]])
%o A365302         w += 1
%o A365302         return A[1]
%o A365302 GreedyBh(6,[0],10000)
%o A365302 (Python)
%o A365302 from itertools import count, islice, combinations_with_replacement
%o A365302 def A365302_gen(): # generator of terms
%o A365302     aset, alist = set(), []
%o A365302     for k in count(0):
%o A365302         bset = set()
%o A365302         for d in combinations_with_replacement(alist+[k],5):
%o A365302             if (m:=sum(d)+k) in aset:
%o A365302                 break
%o A365302             bset.add(m)
%o A365302         else:
%o A365302             yield k
%o A365302             alist.append(k)
%o A365302             aset |= bset
%o A365302 A365302_list = list(islice(A365302_gen(),10)) # _Chai Wah Wu_, Sep 01 2023
%Y A365302 Row 6 of A365515.
%Y A365302 Cf. A025582, A051912, A365300, A365301, A365303, A365304, A365305.
%K A365302 nonn,more
%O A365302 1,3
%A A365302 _Kevin O'Bryant_, Aug 31 2023
%E A365302 a(15)-a(19) from _Chai Wah Wu_, Sep 01 2023
%E A365302 a(20)-a(22) from _Chai Wah Wu_, Sep 09 2023