33 lines
1.7 KiB
Plaintext
33 lines
1.7 KiB
Plaintext
The Mertens function '''M(x)''' is the '''count''' of '''square-free integers''' up to '''x''' that have an '''even number''' of prime factors, '''minus''' the '''count''' of those that have an '''odd number'''.
|
|
|
|
It is an extension of the [[Möbius function]]. Given the Möbius function '''μ(n)''', the Mertens function '''M(x)''' is the sum of the Möbius numbers from '''n == 1''' through '''n == x'''.
|
|
|
|
|
|
;Task:
|
|
|
|
:* Write a routine (function, procedure, whatever) to find the Mertens number for any positive integer '''x'''.
|
|
|
|
:* Use that routine to find and display here, on this page, at least the first 99 terms in a grid layout. (Not just one long line or column of numbers.)
|
|
|
|
:* Use that routine to find and display here, on this page, the number of times the Mertens function sequence '''is equal to zero''' in the range '''M(1)''' through '''M(1000)'''.
|
|
|
|
:* Use that routine to find and display here, on this page, the number of times the Mertens function sequence '''crosses zero''' in the range '''M(1)''' through '''M(1000)'''. (Crossing defined as this term equal to zero but preceding term '''not'''.)
|
|
|
|
|
|
;See also:
|
|
:* [[wp:Mertens function|Wikipedia: Mertens function]]
|
|
:* [[wp:Möbius function|Wikipedia: Möbius function]]
|
|
:* [[oeis:A002321|OEIS: A002321 - Mertens's function]]
|
|
:* [[oeis:A028442|OEIS: A028442 - Numbers n such that Mertens's function M(n) is zero]]
|
|
:* [https://www.youtube.com/watch?v=uvMGZb0Suyc Numberphile - Mertens Conjecture]
|
|
:* [https://codegolf.stackexchange.com/questions/94814/compute-the-mertens-function Stackexchange: compute the mertens function]
|
|
|
|
|
|
''This is not code golf. The stackexchange link is provided as an algorithm reference, not as a guide.''
|
|
|
|
|
|
;Related tasks:
|
|
:* [[Möbius function]]
|
|
<br><br>
|
|
|