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 #13 Oct 27 2019 05:09:59
%S 2,3,4,1,6,0,2,1,8,0,10,-8,-4,8,2,1,12,-2,2,0,10,2,14,-18,-14,2,12,6,
%T 2,2,-6,15,14,-2,38,-42,-32,16,26,-4,78,-66,-74,26,2,66,56,-94,-26,
%U -112,-12,164,18,-38,-16,-134,-8,204,46,-42,-48,-338,2,453,10,-50,-4,-252,24,272,64,-104,-64,-176,-6,242,48,-28,-20,-402
%N For n >= 2, n = Sum_{n/2<=k<=n, gcd(k,n)=1} a(k).
%e The integers which are >= 9/2 and are < 9 and are coprime to 9 are 5,7,8. So a(5) + a(7) + a(8) = 9.
%t f[n_] := Select[Range[Ceiling[n/2], n], GCD[ #, n] == 1 &];g[l_] := Block[{n = Length[l] + 2},Append[l, n - Plus @@ l[[Most[f[n]]]]]];Nest[g, {}, 80] (* _Ray Chandler_, Nov 13 2006 *)
%Y Cf. A124407.
%K sign
%O 1,1
%A _Leroy Quet_, Oct 31 2006
%E Extended by _Ray Chandler_, Nov 13 2006