Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #33 May 04 2023 01:55:56
%S 1,-3,-12,-12,-37,-1,-50,-50,-50,50,-71,-71,-240,-44,181,181,-108,
%T -108,-469,-469,-28,456,-73,-73,-73,603,603,603,-238,-1138,-2099,
%U -2099,-1010,146,1371,1371,2,1446,2967,2967,1286,-478,-2327,-2327,-2327,-211,-2420
%N a(n) = Sum_{k=1..n} mu(k)*k^2.
%C Conjecture: a(n) changes sign infinitely often.
%H Seiichi Manyama, <a href="/A336276/b336276.txt">Table of n, a(n) for n = 1..10000</a>
%F Partial sums of A334657.
%F G.f. A(x) satisfies x = Sum_{k>=1} k^2 * (1 - x^k) * A(x^k). - _Seiichi Manyama_, Apr 01 2023
%F Sum_{k=1..n} k^2 * a(floor(n/k)) = 1. - _Seiichi Manyama_, Apr 03 2023
%t Array[Sum[MoebiusMu[k]*k^2, {k, #}] &, 47] (* _Michael De Vlieger_, Jul 15 2020 *)
%o (PARI) a(n) = sum(k=1, n, moebius(k)*k^2); \\ _Michel Marcus_, Jul 15 2020
%o (Python)
%o from functools import lru_cache
%o @lru_cache(maxsize=None)
%o def A336276(n):
%o if n <= 1:
%o return 1
%o c, j = 1, 2
%o k1 = n//j
%o while k1 > 1:
%o j2 = n//k1 + 1
%o c -= (j2*(j2-1)*((j2<<1)-1)-j*(j-1)*((j<<1)-1))//6*A336276(k1)
%o j, k1 = j2, n//j2
%o return c-(n*(n+1)*((n<<1)+1)-j*(j-1)*((j<<1)-1))//6 # _Chai Wah Wu_, Apr 04 2023
%Y Cf. A002321, A068340, A336277, A336278, A336279.
%Y Cf. A008683, A055615, A070891, A360390, A361983.
%K easy,sign
%O 1,2
%A _Donald S. McDonald_, Jul 15 2020