A034757
a(1)=1, a(n) = smallest odd number such that all sums of pairs of (not necessarily distinct) terms in the sequence are distinct.
Original entry on oeis.org
1, 3, 7, 15, 25, 41, 61, 89, 131, 161, 193, 245, 295, 363, 407, 503, 579, 721, 801, 949, 1129, 1185, 1323, 1549, 1643, 1831, 1939, 2031, 2317, 2623, 2789, 3045, 3143, 3641, 3791, 4057, 4507, 4757, 5019, 5559, 5849, 6309, 6707, 7181, 7593
Offset: 1
5 is not in the sequence since 5+1 is already obtainable from 3+3, 9 is excluded since 1, 3 and 7 are in the sequence and would collide with 1+9
-
a034757 = (subtract 1) . (* 2) . a005282 -- Reinhard Zumkeller, Dec 18 2012
-
seq2={1, 3}; Do[le=Length[seq2]; t=Last[seq2]+2; While[Length[Expand[(Plus @@ (x^seq2) + x^t)^2]] < Pochhammer[3, le]/le!, t=t+2]; AppendTo[seq2, t], {20}]; Print@seq2
-
from itertools import count, islice
def A034757_gen(): # generator of terms
aset1, aset2, alist = set(), set(), []
for k in count(1,2):
bset2 = {k<<1}
if (k<<1) not in aset2:
for d in aset1:
if (m:=d+k) in aset2:
break
bset2.add(m)
else:
yield k
alist.append(k)
aset1.add(k)
aset2.update(bset2)
A034757_list = list(islice(A034757_gen(),30)) # Chai Wah Wu, Sep 05 2023
An incorrect comment from
Amarnath Murthy, also dated Apr 07 2004, has been deleted.
A062065
a(1) = 1; for n >= 1, a(n+1) is smallest number such that the sums of any one, two or three of a(1), ..., a(n) are distinct (repetitions not allowed).
Original entry on oeis.org
1, 2, 4, 8, 15, 28, 52, 96, 165, 278, 460, 663, 980, 1332, 1864, 2609, 3375, 4769, 5600, 6776, 9141, 11505, 14453, 17404, 21904, 25023, 31159, 35006, 42780, 51792, 55799, 68834, 75036, 87163, 96746, 116231, 128924, 144085, 172606, 193507, 207826
Offset: 1
1,2,1+2 are different so a(2) = 2; 1,2,3,1+2,1+3,2+3,1+2+3 are not all different (3 = 1+2) so a(3) is not 3; 1,2,4,1+2,1+4,2+4,1+2+4 are all different so a(3) = 4.
-
{unique(v)=local(b); b=1; for(j=2,length(v),if(v[j-1]==v[j],b=0)); b}
{news(v,q)=local(s); s=[]; for(i=1,length(v),s=concat(s,v[i]+q)); s}
{m=210000; print1(p=1,","); w1=[p]; w2=[]; w3=[]; q=p+1; while(qKlaus Brockhaus, May 17 2003
-
from itertools import count, islice
def A062065_gen(): # generator of terms
aset2, aset3, alist = set(), set(), [1]
yield 1
for k in count(2):
bset2, bset3 = set(), set()
if not (k in aset2 or k in aset3):
for a in alist:
if (b2:=a+k) in aset2 or b2 in aset3:
break
bset2.add(b2)
else:
for a2 in aset2:
if (b3:=a2+k) in aset2 or b3 in aset3:
break
bset3.add(b3)
else:
yield k
alist.append(k)
aset2.update(bset2)
aset3.update(bset3)
A062065_list = list(islice(A062065_gen(),20)) # Chai Wah Wu, Sep 10 2023
A060276
a(1) = 2; a(n) = smallest prime > a(n-1) such that the sum of any three nondecreasing terms, chosen from a(1), ..., a(n-1) and a(n), is unique.
Original entry on oeis.org
2, 3, 7, 19, 59, 73, 211, 257, 631, 919, 1291, 1979, 3229, 4397, 5557, 7151, 10657, 12049, 17827, 19577, 25919, 32143, 35951, 46141, 54499, 64433, 81199, 92507, 116009, 132511, 145303, 171763, 193679, 232417, 260549, 289573, 302009, 340111, 424967, 465151, 506507
Offset: 1
For {2,3,5} the sums are not unique: 2+2+5 = 3+3+3. Three terms chosen from {2,3,7} can be 2+2+2; 2+2+3; 2+3+3; 3+3+3; 2+2+7; 2+3+7; 3+3+7; 2+7+7; 3+7+7; 7+7+7; the sums are all distinct, so a(3) = 7.
-
{unique(v)=local(b); b=1; for(j=2,length(v),if(v[j-1]==v[j],b=0)); b}
{news(v,q)=local(s); s=[]; for(i=1,length(v),s=concat(s,v[i]+q)); s}
{m=310000; print1(p=2,","); w1=[p]; w2=[p+p]; w3=[p+p+p]; q=nextprime(p+1); while(q
-
from itertools import count, islice
from sympy import nextprime
def A060276_gen(): # generator of terms
aset1, aset2, aset3, alist, k = set(), set(), set(), [], 2
while True:
bset2, bset3 = {k<<1}, {3*k}
if 3*k not in aset3:
for d in aset1:
if (m:=d+(k<<1)) in aset3:
break
bset2.add(d+k)
bset3.add(m)
else:
for d in aset2:
if (m:=d+k) in aset3:
break
bset3.add(m)
else:
yield k
alist.append(k)
aset1.add(k)
aset2.update(bset2)
aset3.update(bset3)
k = nextprime(k)
A060276_list = list(islice(A060276_gen(),40)) # Chai Wah Wu, Sep 05 2023
A096772
A B3-sequence: a(1) = 1; for n>1, a(n) = smallest number > a(n-1) such that the sums of any three terms are all distinct.
Original entry on oeis.org
1, 2, 5, 14, 33, 72, 125, 219, 376, 573, 745, 1209, 1557, 2442, 3098, 4048, 5298, 6704, 7839, 10987, 12332, 15465, 19144, 24546, 28974, 34406, 37769, 45864, 50877, 61372, 68303, 77918, 88545, 101917, 122032, 131625, 148575, 171237, 197815, 201454
Offset: 1
-
from itertools import count, islice
def A096772_gen(): # generator of terms
aset1, aset2, aset3, alist = set(), set(), set(), []
for k in count(1):
bset2, bset3 = {k<<1}, {3*k}
if 3*k not in aset3:
for d in aset1:
if (m:=d+(k<<1)) in aset3:
break
bset2.add(d+k)
bset3.add(m)
else:
for d in aset2:
if (m:=d+k) in aset3:
break
bset3.add(m)
else:
yield k
alist.append(k)
aset1.add(k)
aset2 |= bset2
aset3 |= bset3
A096772_list = list(islice(A096772_gen(),30)) # Chai Wah Wu, Sep 05 2023
Comments