login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1)=1, a(2)=2. a(n) is the a(n-1)th integer from among those positive integers coprime to a(n-2).
1

%I #9 Oct 10 2019 13:40:07

%S 1,2,2,3,5,7,8,9,17,25,26,32,69,137,214,215,433,553,554,654,1311,3967,

%T 6565,6566,8979,21267,33151,53216,53217,106497,161963,242965,244832,

%U 306046,714759,1579093,2396450,2420102,7278679,14557369,14778071

%N a(1)=1, a(2)=2. a(n) is the a(n-1)th integer from among those positive integers coprime to a(n-2).

%e a(4)=3, a(5)=5. So a(6) is the 5th positive integer which is coprime to 3. 3 is coprime to 1,2,4,5,7,8,10,11,... So a(6) is the 5th of these, which is 7.

%t f[m_, n_] := Block[{k = 0, c = n},While[c > 0,k++;While[GCD[k, m] > 1, k++ ];c--;];k];g[l_] := Append[l, f[l[[ -2]], l[[ -1]]]];Nest[g, {1, 2}, 40] (* _Ray Chandler_, Dec 31 2006 *)

%Y Cf. A126882.

%K nonn

%O 1,2

%A _Leroy Quet_, Dec 29 2006

%E Extended by _Ray Chandler_, Dec 31 2006