The Möbius function is important in analytic number theory for many reasons.
I'd like to pre-compute a big table of values of the Möbius function to test a few things (sum of Möbius function, i.e. Mertens function, and other similar things, etc.).
Because building a table of Möbius function involves quite long computation (it requires to find the number of prime divisors of each integer):
Is there an online resource that provides a table of $\mu(n)$ for n = 1 ... 10^10 ?
If not, with which programming language would you do this? Maybe would you have open-source code for this?
I converted this code into Python. For the following tests, I used Python 64-bit because it uses more than 1 GB of RAM.
mobius(10**6)takes 2.5 seconds with pure Python + numpy.mobius(10**6)takes 0.7 seconds with Python + numpy + numba (just-in-time compiler).mobius(10**9)takes 39 seconds with Python + numpy + numba.Edit: I also translated this code in Python:
mobius2(10**9)takes ? seconds with Python + numpy + numba.