|
Search: id:A127202
|
|
|
| A127202 |
|
a(1)=1, a(2)=2; a(n) = the smallest positive integer not occurring earlier in the sequence such that GCD(a(n),a(n-1)) does not equal GCD(a(n-1),a(n-2)). |
|
+0 2
|
|
| 1, 2, 4, 3, 6, 5, 10, 7, 14, 8, 9, 12, 11, 22, 13, 26, 15, 18, 16, 17, 34, 19, 38, 20, 21, 24, 23, 46, 25, 30, 27, 28, 32, 29, 58, 31, 62, 33, 36, 35, 40, 37, 74, 39, 42, 41, 82, 43, 86, 44, 45, 48, 47, 94, 49, 56, 50, 51, 54, 52, 53, 106, 55, 60, 57, 59, 118, 61, 122, 63, 66
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
This sequence appears to be a permutation of the positive integers.
|
|
EXAMPLE
|
GCD(a(7),a(8)) = GCD(10,7) = 1. So a(9) is the smallest positive integer which does not occur earlier in the sequence and which is such that GCD(a(9), 7) is not 1. So a(9) = 14, since GCD(14,7) = 7.
|
|
MATHEMATICA
|
f[l_List] := Block[{k = 1, c = GCD[l[[ -1]], l[[ -2]]]}, While[MemberQ[l, k] || GCD[k, l[[ -1]]] == c, k++ ]; Append[l, k]]; Nest[f, {1, 2}, 69] (*Chandler*)
|
|
CROSSREFS
|
Cf. A127203.
Sequence in context: A119618 A113321 A082560 this_sequence A034701 A091857 A132340
Adjacent sequences: A127199 A127200 A127201 this_sequence A127203 A127204 A127205
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Jan 08 2007
|
|
EXTENSIONS
|
Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Jan 16 2007
|
|
|
Search completed in 0.002 seconds
|