OFFSET
1,1
COMMENTS
LINKS
Seppo Mustonen, On integer sequences with mutual k-residues
Seppo Mustonen, On integer sequences with mutual k-residues [Local copy]
MATHEMATICA
seq[k_, n_] := Module[{a, i, j, m, f}, a = Table[0, {n}]; a[[1]] = k + 1; For[i = 2, i <= n, i++, m = a[[i - 1]] + 1; f = 1; While[f == 1, j = 1; While[j < i && Mod[m, a[[j]]] >= k, j = j + 1]; If[j == i, a[[i]] = m; f = 0, m = m + 1]]]; a];
seq[3, 53] (* Jean-François Alcover, Oct 05 2022, after Maple code in links *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seppo Mustonen, Aug 23 2005
STATUS
approved