%I #9 Oct 10 2019 14:04:31
%S 1,1,1,2,2,3,3,3,5,3,7,3,10,9,7,12,16,8,21,15,12,27,31,15,29,30,29,32,
%T 53,17,60,46,36,46,59,22,96,67,60,62,132,8,144,109,45,140,202,53,182,
%U 149,120,184,276,111,230,178,181,208,390,176,407,252,237,283,378,181
%N a(1)=1. a(n) = the sum of the terms from among the first floor(n/2) terms of the sequence which are coprime to n.
%e The first floor(15/2) terms of the sequence are 1,1,1,2,2,3,3. Of these, five terms (1,1,1,2,2) are coprime to 15. So a(15) = 1+1+1+2+2 = 7.
%t f[l_List] := Block[{n = Length[l] + 1},Append[l, Plus @@ Select[Take[l, Floor[n/2]], GCD[ #, n] == 1 &]]];Nest[f, {1}, 65] (* _Ray Chandler_, Dec 11 2006 *)
%Y Cf. A125842.
%K nonn
%O 1,4
%A _Leroy Quet_, Dec 10 2006
%E Extended by _Ray Chandler_, Dec 11 2006