This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A124440 #26 Feb 05 2021 00:13:09 %S A124440 1,1,2,3,7,5,15,12,20,16,40,18,57,33,46,48,100,41,126,60,96,85,187,72, %T A124440 187,120,182,126,301,88,345,192,250,208,318,162,495,261,354,240,610, %U A124440 186,672,330,406,385,805,288,771,376,616,468,1027,365,830,504,774,616,1276 %N A124440 a(n) = Sum_{n/2<=k<=n, gcd(k,n)=1} k. %H A124440 Robert Israel, <a href="/A124440/b124440.txt">Table of n, a(n) for n = 1..10000</a> %F A124440 For n > 2, a(n) = phi(n)*n/2 - A066840(n). %e A124440 The integers which are >= 10/2 and are <= 10 and which are coprime to 10 are 7 and 9. So a(10) = 7 + 9 = 16. %p A124440 N:= 100: # for a(1)..a(N) %p A124440 G:= add(numtheory:-mobius(n)*n*x^(2*n)/((1-x^n)*(1-x^(2*n))^2), n=1..N/2): %p A124440 S:= series(G, x, N+1): %p A124440 A66840:= [seq(coeff(S, x, j), j=1..N)]: %p A124440 f:= proc(n) n*numtheory:-phi(n)/2 - A66840[n] end proc: %p A124440 f(1):= 1: f(2):= 1: %p A124440 map(f, [$1..N]); # _Robert Israel_, Feb 02 2021 %t A124440 a[n_] := Plus @@ Select[Range[Ceiling[n/2], n], GCD[ #, n] == 1 &];Table[a[n], {n, 60}] (* _Ray Chandler_, Nov 12 2006 *) %o A124440 (PARI) a(n) = sum(k=ceil(n/2), n, if (gcd(n, k)==1, k)); \\ _Michel Marcus_, Feb 03 2021 %Y A124440 Cf. A066840, A124446, A124447. %K A124440 nonn %O A124440 1,3 %A A124440 _Leroy Quet_, Nov 01 2006 %E A124440 Extended by _Ray Chandler_, Nov 12 2006