A093110
Numbers that can be written as a sum of three elements from A051912.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 8, 9, 12, 13, 14, 15, 17, 18, 21, 26, 27, 30, 32, 33, 34, 36, 37, 39, 40, 45, 46, 49, 58, 64, 65, 68, 71, 72, 73, 75, 76, 77, 79, 84, 85, 88, 96, 97, 103, 104, 107, 116, 124, 125, 126, 128, 129, 132, 135, 137, 138, 141, 142, 143, 146, 150, 155, 156
Offset: 0
15 occurs since it can be written as 1 + 1 + 13; 16 does not occur since it cannot be written as a sum of at most 3 terms from the set {0,1,4,13,32,...} = A051912.
-
li=Take[A051912, 16]; Select[Union[Flatten[Outer[Plus, li, li, li]]], # <= Last[li] &]
A093111
Position of A051912 in A093110. a(n) is the number of integers < A051912(n) that can be expressed as a sum of three terms from A051912.
Original entry on oeis.org
0, 1, 4, 10, 19, 33, 49, 75, 110, 146, 181, 256, 312, 414, 486, 594, 710, 838, 948, 1184, 1300, 1522, 1758, 2042, 2279, 2546, 2754, 3148, 3411, 3856, 4179, 4611, 5043, 5560, 6213
Offset: 0
a(3) = 10 since A051912(3)=13 and 13 =A093110(10), or there are 10 integers less than 13 that can be written as a sum of at most 3 terms from the set {0,1,4,13,32,..}=A051912.
A365515
Table read by antidiagonals upward: the n-th row gives the lexicographically earliest infinite B_n sequence starting from 0.
Original entry on oeis.org
0, 0, 1, 0, 1, 2, 0, 1, 3, 3, 0, 1, 4, 7, 4, 0, 1, 5, 13, 12, 5, 0, 1, 6, 21, 32, 20, 6, 0, 1, 7, 31, 55, 71, 30, 7, 0, 1, 8, 43, 108, 153, 124, 44, 8, 0, 1, 9, 57, 154, 366, 368, 218, 65, 9, 0, 1, 10, 73, 256, 668, 926, 856, 375, 80, 10, 0, 1, 11, 91, 333, 1153, 2214, 2286, 1424, 572, 96, 11
Offset: 1
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, ...
Cf.
A001477 (n=1),
A025582 (n=2),
A051912 (n=3),
A365300 (n=4),
A365301 (n=5),
A365302 (n=6),
A365303 (n=7),
A365304 (n=8),
A365305 (n=9),
A002061 (k=4),
A369817 (k=5),
A369818 (k=6),
A369819 (k=7),
A347570.
-
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([])
A365515_list = list(islice(A365515_gen(),30))
A365300
a(n) is the smallest nonnegative integer such that the sum of any four ordered terms a(k), k<=n (repetitions allowed), is unique.
Original entry on oeis.org
0, 1, 5, 21, 55, 153, 368, 856, 1424, 2603, 4967, 8194, 13663, 22432, 28169, 47688, 65545, 96615, 146248, 202507, 266267, 364834, 450308, 585328, 773000, 986339, 1162748, 1472659, 1993180, 2275962, 3012656, 3552307, 4590959, 5404183, 6601787, 7893270, 9340877
Offset: 1
a(4) != 12 because 12+1+1+1 = 5+5+5+0.
- Chai Wah Wu, Table of n, a(n) for n = 1..50
- J. Cilleruelo and J Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(4,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365300_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],3):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365300_list = list(islice(A365300_gen(),20)) # Chai Wah Wu, Sep 01 2023
A036241
a(1)=1, a(2)=2, a(3)=3; for n >= 3, a(n) is smallest number such that all a(i) for 1 <= i <= n are distinct, all a(i)+a(j) for 1 <= i < j <= n are distinct and all a(i)+a(j)+a(k) for 1 <= i < j < k <= n are distinct.
Original entry on oeis.org
1, 2, 3, 5, 8, 14, 25, 45, 82, 140, 235, 388, 559, 839, 1286, 1582, 2221, 3144, 4071, 5795, 6872, 9204, 11524, 13796, 17686, 21489, 26019, 31080, 37742, 45067, 53144, 58365, 67917, 78484, 91767, 106513, 118600, 133486, 147633, 166034, 174717
Offset: 1
For {1,2,3,4} we have 1+4 = 2+3, so a(4) is not 4. For {1,2,3,5} the terms 1, 2, 3, 5 are distinct, the sums 1+2, 1+3, 1+5, 2+3, 2+5, 3+5 are distinct and the sums 1+2+3, 1+2+5, 1+3+5, 2+3+5 are distinct, so a(4) = 5.
- Letter from V. Jooste, Pretoria, South Africa, Sep. 8, 1975.
-
import qualified Data.Set as Set (null, map)
import Data.Set (empty, fromList, toList, intersect, union)
a036241 n = a036241_list !! (n-1)
a036241_list = f [1..] [] empty empty where
f (x:xs) ys s2 s3
| null (s2' `intersect` y2s) && null (s3' `intersect` y3s)
= x : f xs (x:ys) (fromList s2' `union` s2) (fromList s3' `union` s3)
| otherwise = f xs ys s2 s3
where s2' = sort $ map (x +) ys
s3' = sort $ map (x +) y2s
y2s = toList s2
y3s = toList s3
-- Reinhard Zumkeller, Oct 02 2011
-
a[1]=1; a[2]=2; a[3]=3; a[n_] := a[n] = Catch[For[an = a[n-1] + 1, True, an++, a[n] = an; t2 = Flatten[Table[a[i] + a[j], {i, 1, n}, {j, i+1, n}]]; If[n*(n-1)/2 == Length[Union[t2]], t3 = Flatten[Table[a[i] + a[j] + a[k], {i, 1, n}, {j, i+1, n}, {k, j+1, n}]]; If[ n*(n-1)*(n-2)/6 == Length[Union[t3]], Throw[an]]]]]; Table[Print[a[n]]; a[n], {n, 1, 41}] (* Jean-François Alcover, Jul 24 2012 *)
-
{unique(v)=local(b); b=1; for(j=2,length(v),if(v[j-1]==v[j],b=0)); b}
{newsort(u,v,q)=local(s); s=[]; for(i=1,length(v),s=concat(s,v[i]+q)); vecsort(concat(u,s))}
{m=175000; print1(1,",",2,",",3,","); w1=[1,2,3]; w2=[3,4,5]; w3=[6]; q=4; while(q
-
from itertools import count, islice
def A036241_gen(): # generator of terms
aset2, aset3 = {3,4,5}, {6}
yield from (alist:=[1,2,3])
for k in count(4):
bset2, bset3 = set(), set()
for a in alist:
if (b2:=a+k) in aset2:
break
bset2.add(b2)
else:
for a2 in aset2:
if (b3:=a2+k) in aset3:
break
bset3.add(b3)
else:
yield k
alist.append(k)
aset2.update(bset2)
aset3.update(bset3)
A036241_list = list(islice(A036241_gen(),20)) # Chai Wah Wu, Sep 10 2023
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.
Original entry on oeis.org
0, 1, 6, 31, 108, 366, 926, 2286, 5733, 12905, 27316, 44676, 94545, 147031, 257637, 435387, 643320, 1107715, 1760092, 2563547, 3744446, 5582657, 8089160, 11373419, 15575157, 21480927, 28569028, 40893371, 53425354, 69774260, 93548428, 119627554
Offset: 1
a(4) != 20 because 20+1+1+1+1 = 6+6+6+6+0.
- J. Cilleruelo and J Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(5,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365301_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],4):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365301_list = list(islice(A365301_gen(),10)) # Chai Wah Wu, Sep 01 2023
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.
Original entry on oeis.org
0, 1, 7, 43, 154, 668, 2214, 6876, 16864, 41970, 94710, 202027, 429733, 889207, 1549511, 3238700, 5053317, 8502061, 15583775, 25070899, 40588284, 63604514
Offset: 1
a(5) != 50 because 50+1+1+1+1+0 = 43+7+1+1+1+1.
- J. Cilleruelo and J Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(6,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365302_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],5):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365302_list = list(islice(A365302_gen(),10)) # Chai Wah Wu, Sep 01 2023
A365303
a(n) is the smallest nonnegative integer such that the sum of any seven ordered terms a(k), k<=n (repetitions allowed), is unique.
Original entry on oeis.org
0, 1, 8, 57, 256, 1153, 4181, 14180, 47381, 115267, 307214, 737909, 1682367, 3850940, 8557010, 18311575, 37925058, 61662056
Offset: 1
a(3) != 7 because 7+0+0+0+0+0+0 = 1+1+1+1+1+1+1.
- J. Cilleruelo and J Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(7,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365303_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],6):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365303_list = list(islice(A365303_gen(),10)) # Chai Wah Wu, Sep 01 2023
A365304
a(n) is the smallest nonnegative integer such that the sum of any eight ordered terms a(k), k<=n (repetitions allowed), is unique.
Original entry on oeis.org
0, 1, 9, 73, 333, 1822, 8043, 28296, 102042, 338447, 1054824, 2569353, 6237718, 15947108, 36179796
Offset: 1
a(4) != 70 because 70+1+1+0+0+0+0+0 = 9+9+9+9+9+9+9+0.
- J. Cilleruelo and J Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(8,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365304_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],7):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365304_list = list(islice(A365304_gen(),10)) # Chai Wah Wu, Sep 01 2023
A365305
a(n) is the smallest nonnegative integer such that the sum of any nine ordered terms a(k), k<=n (repetitions allowed), is unique.
Original entry on oeis.org
0, 1, 10, 91, 500, 3119, 13818, 59174, 211135, 742330, 2464208, 7616100, 19241477, 56562573
Offset: 1
a(4) != 72 because 72+1+1+1+1+1+1+1+1+0 = 10+10+10+10+10+10+10+10+0.
- J. Cilleruelo and J. Jimenez-Urroz, B_h[g] sequences, Mathematika (47) 2000, pp. 109-115.
- Melvyn B. Nathanson, The third positive element in the greedy B_h-set, arXiv:2310.14426 [math.NT], 2023.
- Melvyn B. Nathanson and Kevin O'Bryant, The fourth positive element in the greedy B_h-set, arXiv:2311.14021 [math.NT], 2023.
- Kevin O'Bryant, A complete annotated bibliography of work related to Sidon sequences, Electron. J. Combin., DS11, Dynamic Surveys (2004), 39 pp.
-
def GreedyBh(h, seed, stopat):
A = [set() for _ in range(h+1)]
A[1] = set(seed) # A[i] will hold the i-fold sumset
for j in range(2,h+1): # {2,...,h}
for x in A[1]:
A[j].update([x+y for y in A[j-1]])
w = max(A[1])+1
while w <= stopat:
wgood = True
for k in range(1,h):
if wgood:
for j in range(k+1,h+1):
if wgood and (A[j].intersection([(j-k)*w + x for x in A[k]]) != set()):
wgood = False
if wgood:
A[1].add(w)
for k in range(2,h+1): # update A[k]
for j in range(1,k):
A[k].update([(k-j)*w + x for x in A[j]])
w += 1
return A[1]
GreedyBh(9,[0],10000)
-
from itertools import count, islice, combinations_with_replacement
def A365305_gen(): # generator of terms
aset, alist = set(), []
for k in count(0):
bset = set()
for d in combinations_with_replacement(alist+[k],8):
if (m:=sum(d)+k) in aset:
break
bset.add(m)
else:
yield k
alist.append(k)
aset |= bset
A365305_list = list(islice(A365305_gen(),10)) # Chai Wah Wu, Sep 01 2023
Showing 1-10 of 14 results.
Comments