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.

Showing 1-4 of 4 results.

A051402 Inverse Mertens function: smallest k such that |M(k)| = n, where M(x) is Mertens's function A002321.

Original entry on oeis.org

1, 5, 13, 31, 110, 114, 197, 199, 443, 659, 661, 665, 1105, 1106, 1109, 1637, 2769, 2770, 2778, 2791, 2794, 2795, 2797, 2802, 2803, 6986, 6987, 7013, 7021, 8503, 8506, 8507, 8509, 8510, 8511, 9749, 9822, 9823, 9830, 9831, 9833, 9857, 9861, 19043
Offset: 1

Views

Author

Keywords

Comments

From Torlach Rush, Oct 11 2018: (Start)
For k <= 10^7:
- a(n) is squarefree.
- if a(n) > M(k) then A008683(a(n)) is negative.
- if a(n) = M(k) then A008683(a(n)) is positive. (End)

Examples

			M(31) = -4, smallest one equal to +-4.
		

Crossrefs

Essentially same as A060434 except for initial terms.

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a051402 = (+ 1) . fromJust . (`elemIndex` ms) where
       ms = map (abs . a002321) [1..]
    -- Reinhard Zumkeller, Dec 26 2012
    
  • Maple
    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:
  • Mathematica
    a = s = 0; Do[s = s + MoebiusMu[n]; If[ Abs[s] > a, a = Abs[s]; Print[n]], {n, 1, 20000}]
  • PARI
    M(n)=sum(k=1,n,moebius(k));
    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
    
  • PARI
    M(n) = sum(k=1, n, moebius(k));
    a(n) = my(k = 1, s = moebius(1)); while (abs(s) != n, k++; s += moebius(k)); k; \\ Michel Marcus, Oct 12 2018

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.

Original entry on oeis.org

1, 4, 5, 8, 9, 32, 77, 88, 93, 94, 95, 96, 99, 100, 119, 124, 147, 148, 161, 162, 189, 206, 207, 208, 209, 210, 213, 214, 215, 216, 217, 218, 219, 226, 329, 330, 333, 334, 335, 394, 395, 416, 417, 424, 425, 428, 489, 514, 515, 544, 545, 546, 549, 554, 579, 584, 723, 724, 725, 800
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 19 2021

Keywords

Crossrefs

Programs

  • Maple
    N:= 10000: # for values <= N
    omega:= n -> nops(numtheory:-factorset(n)):
    R:= map(n -> (-1)^omega(n),[$1..10000]):
    S:= map(abs,ListTools:-PartialSums(R)):
    m:= max(S):
    V:= Vector(m):
    for i from 1 to N do if S[i] > 0 and V[S[i]] = 0 then V[S[i]]:= i fi od:
    convert(V,list); # Robert Israel, Oct 30 2023
  • Mathematica
    Table[k=1;While[Abs[Sum[(-1)^PrimeNu@j,{j,k}]]!=n,k++];k,{n,30}] (* Giorgos Kalogeropoulos, Jul 19 2021 *)
  • PARI
    a(n) = my(k=1); while (abs(sum(j=1, k, (-1)^omega(j))) != n, k++); k; \\ Michel Marcus, Jul 19 2021

Formula

a(n) = min {k : |Sum_{j=1..k} mu(rad(j))| = n}, where mu is the Moebius function and rad is the squarefree kernel.

A346455 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.

Original entry on oeis.org

1, 52, 55, 56, 57, 58, 77, 88, 93, 94, 95, 96, 99, 100, 119, 124, 147, 148, 161, 162, 189, 206, 207, 208, 209, 210, 213, 214, 215, 216, 217, 218, 219, 226, 329, 330, 333, 334, 335, 394, 395, 416, 417, 424, 425, 428, 489, 514, 515, 544, 545, 546, 549, 554, 579, 584, 723, 724, 725, 800
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=(k=1;While[Sum[(-1)^PrimeNu@j,{j,k}]!=n,k++];k);Array[a,25] (* Giorgos Kalogeropoulos, Jul 19 2021 *)
  • PARI
    a(n) = my(k=1); while (sum(j=1, k, (-1)^omega(j)) !=n, k++); k; \\ Michel Marcus, Jul 19 2021

Formula

a(n) = min {k : Sum_{j=1..k} mu(rad(j)) = n}, where mu is the Moebius function and rad is the squarefree kernel.

A346456 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.

Original entry on oeis.org

3, 4, 5, 8, 9, 32, 9283, 9284, 9285, 9292, 9293, 9294, 9295, 9296, 9343, 9434, 9437, 9440, 9479, 9686, 9689, 9690, 9697, 9698, 9699, 9700, 9711, 9716, 9717, 9718, 9719, 9720, 9721, 9740, 9741, 9852, 9855, 9856, 9857, 10284, 10285, 10286, 10305, 10314, 10325, 10326, 10331, 10338
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=(k=1;While[Sum[(-1)^PrimeNu@j,{j,k}]!=-n,k++];k);Array[a,6] (* Giorgos Kalogeropoulos, Jul 19 2021 *)
  • PARI
    a(n) = my(k=1); while (sum(j=1, k, (-1)^omega(j)) != -n, k++); k; \\ Michel Marcus, Jul 19 2021

Formula

a(n) = min {k : Sum_{j=1..k} mu(rad(j)) = -n}, where mu is the Moebius function and rad is the squarefree kernel.
Showing 1-4 of 4 results.