The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 4
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 REFERENCES Letter from V. Jooste, Pretoria, South Africa, Sep. 8, 1975. LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..75 EXAMPLE 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. MATHEMATICA a=1; a=2; a=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 *) PROG (PARI) {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=; q=4; while(q

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 2 09:21 EDT 2020. Contains 335398 sequences. (Running on oeis4.)