# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a143443 Showing 1-1 of 1 %I A143443 #20 Mar 31 2021 02:58:03 %S A143443 1,0,-3,-4,-10,-6,-14,-16,-18,-10,-22,-24,-39,-28,-15,-16,-34,-36,-57, %T A143443 -60,-42,-22,-46,-48,-50,-26,-27,-28,-58,-90,-124,-128,-99,-68,-35, %U A143443 -36,-74,-38,0,0,-41,-84,-129,-132 %N A143443 a(n) = n * A002321(n). %C A143443 Equals row sums of triangle A143442. %e A143443 First four terms = (1, 0, -3, -4) = (1*1, 2*0, 3*(-1), 4*(-1)), where the Mertens function A002321 = (1, 0, -1, -1, -2, -1, -2, -2, -2,...) %e A143443 a(5) = -10 = sum of row 5 terms of triangle A143442: (5 - 5 - 5 + 0 - 5). %t A143443 Table[n Plus @@ MoebiusMu[Range[n]], {n, 1, 80}] (* _Carl Najafi_, Aug 17 2011 *) %o A143443 (PARI) a(n) = n*sum(k=1, n, moebius(k)); \\ _Michel Marcus_, Aug 22 2015 %o A143443 (Python) %o A143443 from functools import lru_cache %o A143443 @lru_cache(maxsize=None) %o A143443 def A143443(n): %o A143443 if n == 0: %o A143443 return 0 %o A143443 c, j = n, 2 %o A143443 k1 = n//j %o A143443 while k1 > 1: %o A143443 j2 = n//k1 + 1 %o A143443 c += (j2-j)*A143443(k1)//k1 %o A143443 j, k1 = j2, n//j2 %o A143443 return n*(j-c) # _Chai Wah Wu_, Mar 30 2021 %Y A143443 Cf. A002321, A143442. %K A143443 sign %O A143443 1,3 %A A143443 _Gary W. Adamson_, Aug 15 2008 %E A143443 More terms from _Carl Najafi_, Aug 17 2011 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE