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 A091369 #35 Mar 31 2021 02:57:21 %S A091369 1,3,7,12,20,27,39,50,64,77,97,112,136,155,177,200,232,255,291,318, %T A091369 350,381,425,456,500,537,581,620,676,713,773,820,872,921,979,1026, %U A091369 1098,1153,1215,1270,1350,1403,1487,1550,1618,1685,1777,1840,1930,1999,2081,2156 %N A091369 a(n) = Sum_{i=1..n} phi(i)*ceiling(n/i). %F A091369 a(n) = n^2 - A063985(n). - _Enrique Pérez Herrero_, Feb 25 2012 %p A091369 A091369:=n->add(numtheory[phi](i)*ceil(n/i), i=1..n): seq(A091369(n), n=1..100); # _Wesley Ivan Hurt_, Apr 13 2017 %t A091369 A091369[n_] := Sum[EulerPhi[i]*Ceiling[n/i], {i, n}] (* _Robert G. Wilson v_, Mar 02 2004 *) %o A091369 (PARI) a(n) = sum(k=1, n, eulerphi(k)*ceil(n/k)); \\ _Michel Marcus_, Apr 13 2017 %o A091369 (Python) %o A091369 from functools import lru_cache %o A091369 @lru_cache(maxsize=None) %o A091369 def A091369(n): %o A091369 if n == 0: %o A091369 return 0 %o A091369 c, j = 0, 2 %o A091369 k1 = n//j %o A091369 while k1 > 1: %o A091369 j2 = n//k1 + 1 %o A091369 c += (j2-j)*(2*A091369(k1)-(k1*(k1-1)+1)) %o A091369 j, k1 = j2, n//j2 %o A091369 return n*(n-1)-(c-j)//2 # _Chai Wah Wu_, Mar 29 2021 %Y A091369 Cf. A063985. %K A091369 nonn,easy %O A091369 1,2 %A A091369 _Jon Perry_, Mar 01 2004 %E A091369 More terms from _Robert G. Wilson v_, Mar 02 2004