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 A346457 #16 Oct 31 2023 01:08:08 %S A346457 1,4,5,8,9,32,77,88,93,94,95,96,99,100,119,124,147,148,161,162,189, %T A346457 206,207,208,209,210,213,214,215,216,217,218,219,226,329,330,333,334, %U A346457 335,394,395,416,417,424,425,428,489,514,515,544,545,546,549,554,579,584,723,724,725,800 %N A346457 a(n) is the smallest number k such that |Sum_{j=1..k} (-1)^omega(j)| = n, where omega(j) is the number of distinct primes dividing j. %H A346457 Robert Israel, <a href="/A346457/b346457.txt">Table of n, a(n) for n = 1..3223</a> %F A346457 a(n) = min {k : |Sum_{j=1..k} mu(rad(j))| = n}, where mu is the Moebius function and rad is the squarefree kernel. %p A346457 N:= 10000: # for values <= N %p A346457 omega:= n -> nops(numtheory:-factorset(n)): %p A346457 R:= map(n -> (-1)^omega(n),[$1..10000]): %p A346457 S:= map(abs,ListTools:-PartialSums(R)): %p A346457 m:= max(S): %p A346457 V:= Vector(m): %p A346457 for i from 1 to N do if S[i] > 0 and V[S[i]] = 0 then V[S[i]]:= i fi od: %p A346457 convert(V,list); # _Robert Israel_, Oct 30 2023 %t A346457 Table[k=1;While[Abs[Sum[(-1)^PrimeNu@j,{j,k}]]!=n,k++];k,{n,30}] (* _Giorgos Kalogeropoulos_, Jul 19 2021 *) %o A346457 (PARI) a(n) = my(k=1); while (abs(sum(j=1, k, (-1)^omega(j))) != n, k++); k; \\ _Michel Marcus_, Jul 19 2021 %Y A346457 Cf. A001221, A002053, A051400, A051401, A051402, A051470, A060434, A076479, A174863, A275547, A346455, A346456. %K A346457 nonn %O A346457 1,2 %A A346457 _Ilya Gutkovskiy_, Jul 19 2021