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 A307997 #23 Jul 31 2020 01:53:07 %S A307997 1,1,2,4,9,11,25,35,53,52,109,87,188,174,218,255,432,301,622,492,636, %T A307997 633,1109,725,1288,1113,1468,1287,2275,1121,2801,2305,2598,2499,3227, %U A307997 2266,4760,3550,4229,3449,6556,3311,7628,5527,5846,6199,10017,5736,10453,7282,9654,8832,14451,8143,13060 %N A307997 a(n) is the sum of A023896(k) over the totatives of n. %C A307997 a(n) <= A213544(n-1) for n >= 2, with equality if and only if n is prime. - _Robert Israel_, May 10 2019 %H A307997 Robert Israel, <a href="/A307997/b307997.txt">Table of n, a(n) for n = 1..10000</a> %H A307997 Robert Israel, <a href="/A307997/a307997.png">Plot of a(n)/n^3 for n=3 to 20000</a> %F A307997 a(n) = Sum_{1<=k<=n; gcd(k,n)=1} A023896(k). %F A307997 a(n) = Sum_{k=1..n} k*A143620(n,k). %e A307997 a(6) = 11 because the totatives of 6, i.e. the numbers from 1 to 6 that are coprime to 6, are 1 and 5, A023896(1) = 1 and A023896(5) = 1+2+3+4=10, and 1+10=11. %p A307997 A023896:= proc(n) option remember; convert(select(t -> igcd(t,n)=1, [$1..n]),`+`) end proc: %p A307997 f:= n -> convert(map(A023896, select(t -> igcd(t,n)=1, [$1..n])),`+`): %p A307997 map(f, [$1..100]); %t A307997 A023896[n_] := If[n == 1, 1, (n/2) EulerPhi[n]]; %t A307997 a[n_] := Sum[Boole[GCD[n, k] == 1] A023896[k], {k, 1, n}]; %t A307997 Array[a, 100] (* _Jean-François Alcover_, Jul 31 2020 *) %o A307997 (PARI) s(n) = if(n<2, n>0, n*eulerphi(n)/2); \\ A023896 %o A307997 a(n) = sum(k=1, n, if (gcd(n,k)==1, s(k))); \\ _Michel Marcus_, May 10 2019 %Y A307997 Cf. A023896, A143620, A213544. %K A307997 nonn,look %O A307997 1,3 %A A307997 _J. M. Bergot_ and _Robert Israel_, May 09 2019