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).
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
Keywords
Examples
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.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..230
Programs
-
PARI
{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(q
Klaus Brockhaus, May 17 2003 -
Python
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
Extensions
More terms from Naohiro Nomoto, Oct 07 2001
Terms a(27) to a(41) from Klaus Brockhaus, May 17 2003