login
Numbers k such that Mertens's function M(k) (A002321) is zero.
19

%I #59 Jun 09 2024 09:05:29

%S 2,39,40,58,65,93,101,145,149,150,159,160,163,164,166,214,231,232,235,

%T 236,238,254,329,331,332,333,353,355,356,358,362,363,364,366,393,401,

%U 403,404,405,407,408,413,414,419,420,422,423,424,425,427

%N Numbers k such that Mertens's function M(k) (A002321) is zero.

%H Seiichi Manyama, <a href="/A028442/b028442.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..5361 from T. D. Noe)

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MertensFunction.html">Mertens Function</a>.

%t Select[Range[500], Plus@@MoebiusMu[Range[#]] == 0 &] (* _Alonso del Arte_, Jul 06 2004 *)

%t seq[kmax_] := Position[Accumulate[MoebiusMu[Range[kmax]]], 0] // Flatten; seq[500] (* _Amiram Eldar_, Jun 09 2024 *)

%o (Perl) use ntheory ":all"; for (moebius(1,1e7)) { ++$i; say $i unless $M+=$_; } # _Dana Jacobsen_, May 22 2015

%o (PARI) isok(n) = sum(k=1, n, moebius(k)) == 0; \\ _Michel Marcus_, Nov 20 2017

%o (PARI) lista(kmax) = {my(s = 0); for(k = 1, kmax, s += moebius(k); if(s == 0, print1(k, ", ")));} \\ _Amiram Eldar_, Jun 09 2024

%o (Magma) M := func<i | &+[MoebiusMu(k): k in [1..i]]>; [n: n in [1..500] | M(n) eq 0]; // _Bruno Berselli_, Jul 12 2021

%Y Cf. A002321, A118684, A171096.

%K nonn

%O 1,1

%A _Eric W. Weisstein_