%I #9 Feb 21 2018 19:10:33
%S 1,2,3,4,5,6,7,8,10,12,14,16,19,21,23,25,30,32,34,36,41,43,45,47,52,
%T 54,56,58,63,65,67,69,74,76,78,80,85,87,89,91,96,98,100,102,107,109,
%U 111,113,118,120,122,124,129,131,133,135,140,142,144,146,151,153,155,157
%N Smallest positive a(n) such that number of solutions to a(n)=a(j)+a(k) j<k<n is three or less.
%C Numbers {1,3,8,10} mod 11 plus {2,4,5,6,7,16}. Note that while the cases for "zero", "one", "two" and "four" essentially involve a third of the natural numbers, this case for "three" involves 4/11.
%F From _Chai Wah Wu_, Feb 21 2018: (Start)
%F a(n) = a(n-1) + a(n-4) - a(n-5) for n > 17.
%F G.f.: x*(2*x^16 + x^12 + x^11 + x^10 + x^9 + x^8 + x^3 + x^2 + x + 1)/(x^5 - x^4 - x + 1). (End)
%e 12 is in the sequence since it is 5+7, 4+8 and 2+10 but no other sum of two distinct terms.
%t f[s_List, j_Integer] := Block[{cnt, k = s[[-1]] + 1, ss = Plus @@@ Subsets[s, {j}]}, While[ cnt = Count[ss, k]; cnt == 0 || cnt > 3, k++]; Append[s, k]]; Nest[f[#, 2] &, {1, 2}, 70] (* _Robert G. Wilson v_, Jul 05 2014 *)
%Y Cf. A033627, A060469, A060470, A060471, A060472.
%K nonn
%O 1,2
%A _Henry Bottomley_, Mar 15 2001