OFFSET
1,2
COMMENTS
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}.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..3000
FORMULA
From Chai Wah Wu, Feb 21 2018: (Start)
a(n) = a(n-1) + a(n-18) - a(n-19) for n > 40.
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)
EXAMPLE
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.
MATHEMATICA
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 *)
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Mar 15 2001
STATUS
approved