ss[s1_, M_] := Module[{n, chvec, swi, p, s2, i, j, t1, mmm}, t1 = Length[s1]; mmm = 1000; s2 = Table[s1, {t1 + M}] // Flatten; chvec = Array[0&, mmm];
For[i = 1, i <= t1, i++, chvec[[s2[[i]] ]] = 1];
(* get n-th term *)
For[n = t1+1, n <= t1 + M, n++,
(* try i as next term *)
For[i = s2[[n-1]] + 1, i <= mmm, i++, swi = -1;
(* test against j-th term *)
For[j = 1, j <= n-2, j++, p = s2[[n - j]]; If[2*p - i < 0, Break[] ];
If[chvec[[2*p - i]] == 1, swi = 1; Break[] ] ];
If[swi == -1, s2[[n]] = i; chvec[[i]] = 1; Break[] ] ];
If[swi == 1, Print["Error, no solution at n = ", n] ] ];
Table[s2[[i]], {i, 1, t1 + M}] ];