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 A143270 #25 Jun 22 2025 00:16:48 %S A143270 1,4,12,24,50,72,126,176,252,320,462,552,754,896,1080,1280,1632,1836, %T A143270 2280,2560,2940,3300,3956,4320,5000,5512,6210,6776,7830,8340,9548, %U A143270 10368,11352,12240,13440,14256,15984,17100,18486,19600,21730,22764,25112 %N A143270 a(n) = n*A002088(n). %C A143270 Also number of reduced fractions with denominators <= n and values between 1/n and n (inclusive). - _Reinhard Zumkeller_, Jan 15 2009 %H A143270 Harvey P. Dale, <a href="/A143270/b143270.txt">Table of n, a(n) for n = 1..1000</a> %F A143270 a(n) = n*A002088(n), where A002088(n) = partial sums of phi(n). %F A143270 Equals row sums of triangle A143269. %F A143270 a(n) = Sum_{i=1..n} Sum_{j=1..i*n} 0^(gcd(i,j)-1). - _Reinhard Zumkeller_, Jan 15 2009 %F A143270 a(n) = (3/Pi^2) * n^3 + O(n^2*log(n)). - _Amiram Eldar_, Jun 01 2025 %e A143270 a(4) = 24 = n*A002088(n) = 4*6. %e A143270 a(4) = 24 = sum of row 4 terms of triangle A143269: (4 + 4 + 8 + 8). %e A143270 a(3) = #{1/3,1/2,2/3,1,4/3,3/2,5/3,2,7/3,5/2,8/3,3} = 12. - _Reinhard Zumkeller_, Jan 15 2009 %t A143270 Module[{nn=50,ps},ps=Accumulate[EulerPhi[Range[nn]]];Times@@@Thread[{Range[nn],ps}]] (* _Harvey P. Dale_, Jun 04 2023 *) %o A143270 (Python) %o A143270 from functools import lru_cache %o A143270 @lru_cache(maxsize=None) %o A143270 def A143270(n): # based on second formula in A018805 %o A143270 if n == 0: %o A143270 return 0 %o A143270 c, j = 0, 2 %o A143270 k1 = n//j %o A143270 while k1 > 1: %o A143270 j2 = n//k1 + 1 %o A143270 c += (j2-j)*(2*A143270(k1)//k1-1) %o A143270 j, k1 = j2, n//j2 %o A143270 return n*(n*(n-1)-c+j)//2 # _Chai Wah Wu_, Mar 25 2021 %o A143270 (PARI) list(nmax) = {my(s = vector(nmax, k, eulerphi(k))); for(k = 2, nmax, s[k] += s[k-1]); for(k = 1, nmax, s[k] = k*s[k]); s} \\ _Amiram Eldar_, Jun 01 2025 %Y A143270 Cf. A000010, A002088, A143269. %K A143270 nonn %O A143270 1,2 %A A143270 _Gary W. Adamson_, Aug 03 2008 %E A143270 More terms from _Reinhard Zumkeller_, Jan 15 2009