cp's OEIS Frontend

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.

A336276 a(n) = Sum_{k=1..n} mu(k)*k^2.

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