%I #14 Feb 22 2018 05:54:24
%S 1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,23,25,27,29,31,36,38,40,42,44,51,
%T 53,55,57,64,66,68,70,72,77,79,81,83,85,92,94,96,98,105,107,109,111,
%U 118,120,122,124,126,131,133,135,137,139,146,148,150,152,159,161,163
%N Smallest positive a(n) such that the number of solutions to a(n)=a(j)+a(k), j<k<n is four or less.
%C Numbers {1,3,10,12,14,16,18,23,25,27,29,31,38,40,42,44,51,53} mod 54 plus {2,4,5,6,7,8,9,20,36}.
%H Vincenzo Librandi, <a href="/A060472/b060472.txt">Table of n, a(n) for n = 1..3000</a>
%F From _Chai Wah Wu_, Feb 21 2018: (Start)
%F a(n) = a(n-1) + a(n-18) - a(n-19) for n > 40.
%F G.f.: x*(5*x^39 - 3*x^38 + 3*x^34 - x^33 + 5*x^29 + x^27 + x^26 + 6*x^25 + x^24 + x^23 + x^22 + x^21 + 4*x^20 + x^19 + x^18 + 2*x^17 + 2*x^16 + 3*x^15 + 2*x^14 + 2*x^13 + 2*x^12 + 2*x^11 + 2*x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)/(x^19 - x^18 - x + 1). (End)
%e 12 is in the sequence since it is 5+7, 4+8, 3+9 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 > 4, k++]; Append[s, k]]; Nest[f[#, 2] &, {1, 2}, 70] (* _Robert G. Wilson v_, Jul 05 2014 *)
%t CoefficientList[Series[(5 x^39 - 3 x^38 + 3 x^34 - x^33 + 5 x^29 + x^27 + x^26 + 6 x^25 + x^24 + x^23 + x^22 + x^21 + 4 x^20 + x^19 + x^18 + 2 x^17 + 2 x^16 + 3 x^15 + 2 x^14 + 2 x^13 + 2 x^12 + 2 x^11 + 2 x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1) / (x^19 - x^18 - x + 1), {x, 0, 100}], x] (* _Vincenzo Librandi_, Feb 22 2018 *)
%Y Cf. A033627, A060469, A060470, A060471, A060472.
%K nonn
%O 1,2
%A _Henry Bottomley_, Mar 15 2001
|