OFFSET
1,2
COMMENTS
Is {a(n+1)-a(n)} a permutation of the positive integers?
MATHEMATICA
a = {1, 2}; For[n = 1, n < 1500, 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]]]]; a (* 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