OFFSET
-3,1
EXAMPLE
a(-3) = 13 = the first prime for which the Mertens function M(n) = -3.
a(-2) = 5 = the first prime for which the Mertens function M(n) = -2.
a(-1) = 3 = the first prime for which the Mertens function M(n) = -1.
a(0) = 2 = min{A000040 INTERSECTION A028442} = the first prime for which the Mertens function M(n) = 0.
a(1) = 97 = min{A000040 INTERSECTION A118684} = the first prime for which the Mertens function M(n) = 1.
a(2) = 229 = the first prime for which the Mertens function M(n) = 2.
a(3) = 223 = the first prime for which the Mertens function M(n) = 3.
MATHEMATICA
Mf=Accumulate[Array[MoebiusMu, 20000]] (* increase range for Mf for n>49 *); Table[i=0; Until[Mf[[Prime[i]]]==n, i++]; Prime[i], {n, -3, 49}] (* James C. McMahon, Nov 16 2024 *)
PROG
(PARI) mertens(n) = sum( k=1, n, moebius(k)); \\ A002321
a(n) = {p = 2; while (mertens(p) != n, p = nextprime(p+1)); p; } \\ Michel Marcus, Sep 24 2013
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Jonathan Vos Post, Oct 02 2006
EXTENSIONS
More terms from Michel Marcus, Sep 24 2013
STATUS
approved