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 A051402 #45 Nov 01 2023 09:57:49 %S A051402 1,5,13,31,110,114,197,199,443,659,661,665,1105,1106,1109,1637,2769, %T A051402 2770,2778,2791,2794,2795,2797,2802,2803,6986,6987,7013,7021,8503, %U A051402 8506,8507,8509,8510,8511,9749,9822,9823,9830,9831,9833,9857,9861,19043 %N A051402 Inverse Mertens function: smallest k such that |M(k)| = n, where M(x) is Mertens's function A002321. %C A051402 From _Torlach Rush_, Oct 11 2018: (Start) %C A051402 For k <= 10^7: %C A051402 - a(n) is squarefree. %C A051402 - if a(n) > M(k) then A008683(a(n)) is negative. %C A051402 - if a(n) = M(k) then A008683(a(n)) is positive. (End) %H A051402 Charles R Greathouse IV, <a href="/A051402/b051402.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %e A051402 M(31) = -4, smallest one equal to +-4. %p A051402 with(numtheory): k := 0: s := 0: for n from 1 to 20000 do s := s+mobius(n): if abs(s) > k then k := abs(s): print(n); fi; od: %t A051402 a = s = 0; Do[s = s + MoebiusMu[n]; If[ Abs[s] > a, a = Abs[s]; Print[n]], {n, 1, 20000}] %o A051402 (Haskell) %o A051402 import Data.List (elemIndex) %o A051402 import Data.Maybe (fromJust) %o A051402 a051402 = (+ 1) . fromJust . (`elemIndex` ms) where %o A051402 ms = map (abs . a002321) [1..] %o A051402 -- _Reinhard Zumkeller_, Dec 26 2012 %o A051402 (PARI) M(n)=sum(k=1,n,moebius(k)); %o A051402 print1(1,", "); c=M(1); n=2; while(n<10^3,if(abs(M(n))>c,print1(n,", "); c=abs(M(n))); n++) \\ _Derek Orr_, Jun 14 2016 %o A051402 (PARI) M(n) = sum(k=1, n, moebius(k)); %o A051402 a(n) = my(k = 1, s = moebius(1)); while (abs(s) != n, k++; s += moebius(k)); k; \\ _Michel Marcus_, Oct 12 2018 %Y A051402 Cf. A002321, A008683, A051400, A051401. %Y A051402 Essentially same as A060434 except for initial terms. %K A051402 nonn,nice %O A051402 1,2 %A A051402 _Jud McCranie_