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”).
%I #10 Oct 10 2019 11:39:33
%S 1,1,1,3,1,5,3,6,4,7,3,10,8,8,10,11,7,11,10,13,13,14,10,18,15,16,16,
%T 17,13,20,20,16,23,21,17,25,24,21,23,25,19,30,25,25,25,29,23,36,29,29,
%U 32,33,26,41,28,37,32,37,30,41,32,41,33,42,32,51,36,44,39,43,38,52,41,44
%N a(1)=1; for n>1, a(n) = the number of earlier terms a(k), 1<k<=n-1, such that (a(k)+n) is coprime to k.
%C The value of a(1) = 1 is arbitrary. a(1) can be any integer and the rest of the sequence would remain unchanged.
%e a(1)+11 = 12 is coprime to 1; a(5)+11 = 12 is coprime to 5; and a(8)+11 = 17 is coprime to 8. These 3 are the only cases where (a(k)+11) is coprime to k, for 1 <=k <=10. So a(11) = 3.
%t f[l_List] := Block[{n = Length[l] + 1},Append[l, Count[Table[GCD[l[[k]] + n, k], {k, n - 1}], 1]]];Nest[f, {1}, 74] (* _Ray Chandler_, Jan 22 2007 *)
%Y Cf. A127417.
%K nonn
%O 1,4
%A _Leroy Quet_, Jan 13 2007
%E Extended by _Ray Chandler_, Jan 22 2007