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.

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

This page as a plain text file.
%I A365301 #52 Mar 28 2024 04:13:39
%S A365301 0,1,6,31,108,366,926,2286,5733,12905,27316,44676,94545,147031,257637,
%T A365301 435387,643320,1107715,1760092,2563547,3744446,5582657,8089160,
%U A365301 11373419,15575157,21480927,28569028,40893371,53425354,69774260,93548428,119627554
%N A365301 a(n) is the smallest nonnegative integer such that the sum of any five ordered terms a(k), k<=n (repetitions allowed), is unique.
%C A365301 This is the greedy B_5 sequence.
%H A365301 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 A365301 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 A365301 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 A365301 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 A365301 a(4) != 20 because 20+1+1+1+1 = 6+6+6+6+0.
%o A365301 (Python)
%o A365301 def GreedyBh(h, seed, stopat):
%o A365301     A = [set() for _ in range(h+1)]
%o A365301     A[1] = set(seed)    # A[i] will hold the i-fold sumset
%o A365301     for j in range(2,h+1): # {2,...,h}
%o A365301         for x in A[1]:
%o A365301             A[j].update([x+y for y in A[j-1]])
%o A365301     w = max(A[1])+1
%o A365301     while w <= stopat:
%o A365301         wgood = True
%o A365301         for k in range(1,h):
%o A365301             if wgood:
%o A365301                 for j in range(k+1,h+1):
%o A365301                     if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
%o A365301                         wgood = False
%o A365301         if wgood:
%o A365301             A[1].add(w)
%o A365301             for k in range(2,h+1): # update A[k]
%o A365301                 for j in range(1,k):
%o A365301                     A[k].update([(k-j)*w + x for x in A[j]])
%o A365301         w += 1
%o A365301         return A[1]
%o A365301 GreedyBh(5,[0],10000)
%o A365301 (Python)
%o A365301 from itertools import count, islice, combinations_with_replacement
%o A365301 def A365301_gen(): # generator of terms
%o A365301     aset, alist = set(), []
%o A365301     for k in count(0):
%o A365301         bset = set()
%o A365301         for d in combinations_with_replacement(alist+[k],4):
%o A365301             if (m:=sum(d)+k) in aset:
%o A365301                 break
%o A365301             bset.add(m)
%o A365301         else:
%o A365301             yield k
%o A365301             alist.append(k)
%o A365301             aset |= bset
%o A365301 A365301_list = list(islice(A365301_gen(),10)) # _Chai Wah Wu_, Sep 01 2023
%Y A365301 Row 5 of A365515.
%Y A365301 Cf. A025582, A051912, A365300, A365302, A365303, A365304, A365305.
%K A365301 nonn,more
%O A365301 1,3
%A A365301 _Kevin O'Bryant_, Aug 31 2023
%E A365301 a(18)-a(28) from _Chai Wah Wu_, Sep 01 2023
%E A365301 a(29)-a(30) from _Chai Wah Wu_, Sep 10 2023
%E A365301 a(31)-a(32) from _Chai Wah Wu_, Mar 02 2024