|
Search: id:A124653
|
|
|
| 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
|
|
| 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; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
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] (*Chandler*)
|
|
CROSSREFS
|
Sequence in context: A085875 A060030 A081025 this_sequence A085947 A069202 A100932
Adjacent sequences: A124650 A124651 A124652 this_sequence A124654 A124655 A124656
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Dec 22 2006
|
|
EXTENSIONS
|
Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Dec 24 2006
|
|
|
Search completed in 0.002 seconds
|