login
Numbers n such that omega(n)=M(n) where omega(n) is A001221(n) and M(n) is the Mertens function A002321(n).
1

%I #31 Oct 27 2023 22:03:25

%S 95,96,97,217,228,335,337,339,342,349,395,397,398,417,543,544,546,550,

%T 603,604,605,802,804,807,808,809,817,819,820,871,872,873,879,881,901,

%U 922,930,938,945,947,949,952,962,969,971,973,975,979,981,989,991,993

%N Numbers n such that omega(n)=M(n) where omega(n) is A001221(n) and M(n) is the Mertens function A002321(n).

%C "omega(n)" (in the definition) means the number of prime factors of n counted without multiplicity, A001221. - _Harvey P. Dale_, Jul 14 2014

%H Alois P. Heinz, <a href="/A067266/b067266.txt">Table of n, a(n) for n = 1..10000</a> (first 1369 terms from Robert Israel)

%p N:= 10^4: # to get all terms up to N

%p A:= [seq(numtheory[mobius](n),n=1..N)]:

%p Mertens:= map(round,Statistics:-CumulativeSum(A)):

%p omega:= t -> nops(numtheory:-factorset(t)):

%p select(t -> omega(t) = Mertens[t], [$1..N]); # _Robert Israel_, Jul 14 2014

%t With[{nn=1000},Flatten[Position[Thread[{Accumulate[Array[ MoebiusMu,nn]], PrimeNu[ Range[ nn]]}],_?(First[#]==Last[#]&),{1},Heads->False]]] (* _Harvey P. Dale_, Jul 14 2014 *)

%o (PARI) isok(n) = (omega(n) == mertens(n)); \\ _Michel Marcus_, Sep 24 2013

%o (Haskell)

%o a067266 n = a067266_list !! (n-1)

%o a067266_list = filter (\x -> a001221 x == a002321 x) [1..]

%o -- _Reinhard Zumkeller_, Jul 14 2014

%Y Cf. A001221, A002321.

%K easy,nonn

%O 1,1

%A _Benoit Cloitre_, Feb 21 2002