|
|
A124653
|
|
a(1)=1. a(2)=2. a(n) = smallest positive integer not occurring earlier in the sequence such that every positive integer <= and coprime to (a(n-1)+a(n-2)) is also coprime to a(n).
|
|
0
|
|
|
1, 2, 3, 5, 4, 9, 13, 8, 7, 15, 11, 16, 27, 43, 10, 53, 21, 32, 59, 49, 6, 25, 31, 14, 45, 61, 64, 125, 63, 47, 20, 67, 29, 12, 41, 71, 28, 33, 73, 106, 179, 19, 18, 37, 55, 23, 24, 79, 103, 26, 81, 107, 94, 201, 295, 62, 17, 83, 40, 123, 163, 22, 185, 69, 127, 56, 183, 239
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Is this sequence a permutation of the positive integers?
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|