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(n) = number of earlier terms a(k), 1<=k<=n-1, such that (k+n) is coprime to a(k).
2

%I #10 Oct 10 2019 11:38:26

%S 1,1,2,3,2,5,4,6,4,8,5,9,7,8,8,12,9,12,9,12,13,13,14,14,14,15,17,18,

%T 13,19,18,20,21,20,22,21,22,23,20,25,22,27,23,25,26,29,29,33,27,33,29,

%U 37,32,33,33,36,33,40,34,37,37,40,37,42,38,40,41,45,37,47,42,46,45,48,46

%N a(1)=1. a(n) = number of earlier terms a(k), 1<=k<=n-1, such that (k+n) is coprime to a(k).

%e (1+9) is coprime to a(1)=1; (2+9) is coprime to a(2)=1; (4+9) is coprime to a(4)=3 and (8+9) is coprime to a(8)=6. These four cases are the only cases where (k+n) is coprime to a(k), for 1<=k<=8. So a(9) = 4.

%t f[l_List] := Block[{n = Length[l] + 1},Append[l, Count[Table[GCD[k + n, l[[k]]], {k, n - 1}], 1]]];Nest[f, {1}, 75] (* _Ray Chandler_, Jan 22 2007 *)

%Y Cf. A127431, A127434.

%K nonn

%O 1,3

%A _Leroy Quet_, Jan 14 2007

%E Extended by _Ray Chandler_, Jan 22 2007