OFFSET
1,2
COMMENTS
Is this sequence a permutation of the positive integers?
EXAMPLE
a(6)+a(7) = 22. The positive integers <= 22 and coprime to 22 are 1,3,5,7,9,13,15, 17,19,21. The smallest positive integer not occurring among the first 7 terms of the sequence which is coprime to 1,3,5,7,9,13,15,17,19, 21 is 8. (7 does not occur among the first 7 terms of {a(k)}, but 7 is not coprime to 7.) So a(8) = 8.
MATHEMATICA
f[n_] := Select[Range[n], GCD[ #, n] == 1 &]; g[l_List] := Block[{k = 1, t = f[l[[ -1]] + l[[ -2]]]}, While[MemberQ[l, k] || Times @@ GCD[t, k] > 1, k++ ]; Append[l, k]]; Nest[g, {1, 2}, 66] (* Ray Chandler, Dec 24 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 22 2006
EXTENSIONS
Extended by Ray Chandler, Dec 24 2006
STATUS
approved