login
a(0)=1; for n>0, a(n) = Sum_{k|n} (number of earlier terms which are coprime to k).
1

%I #10 Oct 10 2019 11:24:42

%S 1,1,4,6,8,10,15,14,17,23,27,22,41,26,41,51,52,32,67,38,76,74,63,45,

%T 99,69,78,81,112,58,138,62,107,107,98,126,154,73,110,127,184,80,193,

%U 86,162,207,126,94,213,133,205,169,198,106,235,197,260,188,169,118,364,122,179

%N a(0)=1; for n>0, a(n) = Sum_{k|n} (number of earlier terms which are coprime to k).

%e The positive divisors of 8 are 1,2,4,8. So a(8) = (the number of earlier terms coprime to 1, which is 8) + (the number of earlier terms coprime to 2, which is 3 for a(0)=1, a(1)=1 and a(6) = 15) + (the number of earlier terms coprime to 4, which is 3) + (the number of earlier terms coprime to 8, which is 3) = 8 + 3 + 3 + 3 = 17.

%t f[l_List] := Block[{n = Length[l], d = Divisors[n], c = 0},Do[ c += Length[Select[l, GCD[ #, d[[i]]] == 1 &]];, {i, Length[d]}];Append[l, c]];Nest[f, {1}, 64] (* _Ray Chandler_, Feb 08 2007 *)

%Y Cf. A127791.

%K nonn

%O 0,3

%A _Leroy Quet_, Jan 29 2007

%E Extended by _Ray Chandler_, Feb 08 2007