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-10 of 10 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

A051400 Smallest value of x such that M(x) = n, where M() is Mertens's function A002321.

Original entry on oeis.org

1, 95, 218, 219, 221, 554, 586, 1357, 1389, 1393, 1403, 1405, 1418, 3227, 3233, 3235, 3239, 3241, 3242, 3277, 3281, 3293, 3295, 8201, 8413, 8418, 8489, 8490, 8491, 8503, 8506, 8507, 8509, 8510, 8511, 11759, 11761, 11762, 11769, 11770, 11771, 11773
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {x = 0; while (sum(k=1,x,moebius(k)) != n, x++); x} \\ Michel Marcus, Sep 24 2013
    
  • PARI
    M(n)=sum(k=1,n,moebius(k));
    print1(1,", "); c=M(1); n=2; while(n<10^4,if(M(n)>c,print1(n,", "); c=M(n)); n++) \\ Derek Orr, Jun 14 2016

A304239 Indices for which the Mertens function A002321 reaches its extremum between subsequent zeros for the first time.

Original entry on oeis.org

1, 31, 43, 61, 73, 95, 114, 146, 154, 161, 165, 199, 221, 233, 237, 246, 286, 330, 341, 354, 357, 359, 365, 374, 395, 402, 406, 410, 417, 421, 426, 443, 538, 586, 619, 665, 782, 787, 794, 797, 803, 813, 818, 830, 851, 861, 871, 879, 885, 887, 890, 894, 897, 901, 905, 907, 911
Offset: 1

Views

Author

M. F. Hasler, May 08 2018

Keywords

Comments

This is related to the Mertens conjecture, more precisely to record values of Mertens function A002321 in the following sense: Due to the short-scale and long-scale oscillations of A002321, it is less appealing to consider record values in the usual sense (cf. A051402), which yields many slowly growing records and record indices lying closely together, during the approach of a "long-scale" record. Therefore this sequence considers maxima or minima between two subsequent zeros, ignoring the empty intervals between immediately adjacent zeros A002321(k) = A002321(k+1) = 0.
The values of these extrema are listed in A304240(n) = A002321(A304239(n)).
Then one can consider the sequence of indices where the corresponding values of A002321 have opposite sign, and/or are larger in absolute value than the preceding record amplitude in the above sense, cf. A304240 & A304241: These are the points which one would really consider as record maxima / minima when looking at the graph on a larger scale.

Examples

			The initial value a(1) = 1 may be considered conventional, or the maximum reached between M(0) = 0 (empty sum) and M(2) = 0, where we write M for the Mertens function A002321.
After M(2) = 0, Mertens's function has negative values up to the next zero, M(39) = 0. The largest negative value is -4 = M(31) = M(32). Therefore a(2) = 31.
Since M(39) = M(40) = 0, the maximum amplitude between these two consecutive zeros would be zero, and is ignored by definition.
The next "local minimum" of this type is reached at M(43) = -3, this value is taken several times up to the next zero at n = 58. Therefore a(3) = 43.
The next such "local minima" are M(61) = -2 and M(73) = -4, so a(4) = 61, a(5) = 73.
It is only at n = 94 that M takes a positive value for the first time after M(1) = 1, and M(95) = 2 is the largest value reached until the next zero (at n = 101), so a(6) = 95.
And so on.
		

Crossrefs

Cf. A002321, A028442 (zeros of M), A051400, A051401, A051402 (where M, -M, |M| reaches k = 1, 2, 3, ...).
Cf. A304240 (values of the extrema), A304241 (indices of increasingly larger extrema), A304242 (the associated values).

Programs

  • PARI
    M=0; for(n=1,oo, if(m=A002321(n),abs(m)>abs(M)&& [M,N]=[m,n], M&& M=printf(N",")))

A304241 Indices where Mertens function A002321 reaches record amplitudes between zeros.

Original entry on oeis.org

1, 31, 114, 199, 443, 665, 1109, 1637, 2803, 7021, 8511, 9861, 19291, 24185, 31990, 42961, 48433, 59577, 96014, 141869, 230399, 300551, 355733, 603151, 926265, 1066854, 1793918, 3239797, 5343761, 6481601, 7109110, 10194458, 12874814, 30919091, 61913863
Offset: 1

Views

Author

M. F. Hasler, May 08 2018

Keywords

Comments

A subsequence of A051402 and A304239.
These are the indices where the Mertens function M = A002321 not only reaches a record value (in absolute value), but also its largest amplitude between subsequent zeros (as to avoid many "intermediate" records).

Crossrefs

Cf. A002321, A028442 (zeros of M), A051400, A051401, A051402 (where M, -M, |M| reaches k = 1, 2, 3, ...).

Programs

  • PARI
    L=M=0;for(n=1,oo,if(m=A002321(n),abs(m)>abs(M)&&[M,N]=[m,n],abs(M)>abs(L) && (L=M) && print1(N",");M=0))

Extensions

More terms from Bert Dobbelaere, Oct 30 2018

A304242 Increasingly larger (in absolute value) extrema of the Mertens function A002321 between subsequent zeros.

Original entry on oeis.org

1, -4, -6, -8, -9, -12, -15, -16, -25, -29, 35, -43, 51, -72, 73, -88, 96, -113, -132, -134, -154, 240, -258, -278, -368, 432, 550, -683, -847, 1060, -1078, 1240, -1447, -2573, 2845, -3448, -4610, -6226, 6695, -8565, 9132, 10246, -15335, -17334, 21777, -25071
Offset: 1

Views

Author

M. F. Hasler, May 08 2018

Keywords

Comments

Values of A002321 at the indices listed in A304241.
These are those records of the absolute value of A002321 which are the maxima or minima between subsequent zeros. Figuratively speaking, these are the increasingly larger heights of the mountains or depths of the valleys of the graph of A002321.

Crossrefs

Cf. A002321, A028442 (zeros of M), A051400, A051401, A051402 (where M, -M, |M| reaches k = 1, 2, 3, ...).

Programs

  • PARI
    L=M=0; for(n=1,oo, if(m=merten(n), abs(m)>abs(M) && [M,N]=[m,n], abs(M)>abs(L) && (L=M) && print1(L","); M=0))
    
  • PARI
    print1(j=1);for(i=1,#A051402-1,while( A028442[j] < A051402[i], j++); if( A028442[j-(j>1)]<=A051402[i] && A028442[j] < A051402[i+1], print1(","A002321(A051402[i])))) \\ Using precomputed vectors A002321 and A051402, e.g. from the b-files: {c=0;AX=apply(t->fromdigits(digits(t)[#Str(c++)+1..-1]),readvec("/tmp/bX.txt"))}

Formula

a(n) = A002321(A304241(n)).

Extensions

More terms from Bert Dobbelaere, Oct 30 2018

A304240 Extremum of the Mertens function A002321 between two successive (but not adjacent) zeros.

Original entry on oeis.org

1, -4, -3, -2, -4, 2, -6, 1, -2, 1, -1, -8, 5, -1, 1, -3, -8, 1, 3, -1, -1, -1, 1, -3, 2, -1, -1, -2, 2, -1, -1, -9, 1, 7, -5, -12, -1, -2, 1, -1, 3, 1, 3, -4, 1, -3, 2, 2, -1, -1, -1, -1, -1, 2, 1, -1, -1, 1, 1, 6, 1, 2, 1, -1, -15, -3, 1, -1, 2, 1, 2, -1, -1, 1, 1
Offset: 1

Views

Author

M. F. Hasler, May 08 2018

Keywords

Comments

In view of its definition, the Mertens function A002321 does not change sign between two successive zeros. Here we list the extrema, i.e., smallest or largest value, depending on the respective sign, between two zeros, excluding the case where these zeros are immediately adjacent, i.e., A002321(k) = A002321(k+1) = 0.
See A304239 and A304241 - A304242 for motivation & further information.

Examples

			The Mertens function M = A002321 is defined as partial sums of the Möbius function mu. At n = 1 it has the nonzero value M(1) = 1, and at n = 2 it has its first zero, M(2) = 0. Therefore we let a(1) = 1 by convention. (One can also consider that M(0) = 0, the empty sum, is an "initial zero" preceding M(1).)
Between the first and second zero of M = A002321, M(2) = 0 and M(39) = 0, M takes only negative values, and the largest in absolute value is a(2) = -4.
M(39) = 0 is immediately followed by another zero, M(40) = 0, the "empty" interval between these two is ignored by definition.
The next zero is at n = 58. Between n = 40 and n = 58 M takes only negative values, and the minimum is a(3) = -3.
		

Crossrefs

Cf. A002321, A028442 (zeros of M), A051400, A051401, A051402 (where M, -M, |M| reaches k = 1, 2, 3, ...).

Programs

  • PARI
    M=0; for(n=1, oo, if(m=A002321(n), abs(m)>abs(M) && M=m, M && M=print1(M", ")))

Formula

a(n) = A002321(A304239(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.

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.

A057639 First differences of zero-sites (A028442) of Mertens's function A002321.

Original entry on oeis.org

37, 1, 18, 7, 28, 8, 44, 4, 1, 9, 1, 3, 1, 2, 48, 17, 1, 3, 1, 2, 16, 75, 2, 1, 1, 20, 2, 1, 2, 4, 1, 1, 2, 27, 8, 2, 1, 1, 2, 1, 5, 1, 5, 1, 2, 1, 1, 1, 2, 1, 109, 4, 66, 1, 27, 1, 1, 144, 4, 8, 2, 1, 2, 13, 1, 2, 9, 1, 1, 24, 1, 3, 16, 8, 6, 1, 2, 3, 4, 2, 1, 2, 5, 1, 2, 4, 3, 2, 1, 3, 1, 82, 3, 5
Offset: 1

Views

Author

Labos Elemer, Oct 11 2000

Keywords

Comments

Mertens's function (A002321) is oscillating. The width of its waves is given here.

Crossrefs

Programs

  • Mathematica
    Differences[Position[Accumulate[Array[MoebiusMu,1500]],0]//Flatten] (* Harvey P. Dale, Nov 10 2016 *)
  • PARI
    lista(kmax) = {my(s = 0, k1 = 2); for(k2 = 3, kmax, s += moebius(k2); if(s == 0, print1(k2 - k1, ", "); k1 = k2));} \\ Amiram Eldar, Jun 09 2024

Formula

a(n) = A028442(n+1) - A028442(n).

Extensions

Offset corrected by Amiram Eldar, Jun 09 2024
Showing 1-10 of 10 results.