This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A060472 #14 Feb 22 2018 05:54:24 %S A060472 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 A060472 53,55,57,64,66,68,70,72,77,79,81,83,85,92,94,96,98,105,107,109,111, %U A060472 118,120,122,124,126,131,133,135,137,139,146,148,150,152,159,161,163 %N A060472 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 A060472 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 A060472 Vincenzo Librandi, <a href="/A060472/b060472.txt">Table of n, a(n) for n = 1..3000</a> %F A060472 From _Chai Wah Wu_, Feb 21 2018: (Start) %F A060472 a(n) = a(n-1) + a(n-18) - a(n-19) for n > 40. %F A060472 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 A060472 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 A060472 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 A060472 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 A060472 Cf. A033627, A060469, A060470, A060471, A060472. %K A060472 nonn %O A060472 1,2 %A A060472 _Henry Bottomley_, Mar 15 2001