OFFSET
1,2
COMMENTS
Is this sequence a permutation of the positive integers?
MATHEMATICA
a = {1, 2}; For[n = 1, n < 1000, n++, n = a[[ -1]]; c = 0; While[c == 0, n++; If[GCD[n, a[[ -1]]] > 1, b = 0; For[j = 1, j < Length[a], j++, If[a[[j + 1]] - a[[j]] == n - a[[ -1]], b = 1]]; If[b == 0, AppendTo[a, n]; c = 1]]]]; b = {}; For[k = 1, k < Length[a], k++, AppendTo[b, a[[k + 1]] - a[[k]]]]; b (* Stefan Steinerberger, Oct 21 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 20 2007
EXTENSIONS
More terms from Stefan Steinerberger, Oct 21 2007
STATUS
approved