This is a program that evaluates the summatory Liouville function up to an amount and outputs the sum along the way. The summatory Liouville function is a function that, given a natural number, for every natural number less than it: adds 1 to the sum if the number has an even number of prime factors and subtracts one if the number has an odd number of prime factors.
This function is known for its connection with the polya conjecture: where George Polya conjected that most numbers has an odd number of prime factors (sum Liouville function of negative.) This conjecture was disproved by C. Brian Haselgrove and a counterexample was found later at about 906 million by Minoru Tanaka.
Other generalizations and connections to other areas of mathmatics can be made from this function
Specifically, the results listed here are higher values of A002819
The source code is hosted on this github repo. You can improve it if you want to.
Simple, single-threaded C code.
Below are the results for runs I have done. The format and data included in each file is listed below
The results are most likely correct but there may be hardware
instability or bugs, which would cascade due to the nature of the program.
• Results n ≤ 906,488,079 is certainly correct after cross referencing other sources.
• Results n ≤ 30,040,000,000 has been calculated twice with matching results.
Log file - primary run (~33.27b) 120,743 bytes
Log file - secondary run (~30.04b) 108,959 bytes
Contains timestamp. Data not sanitized.
This analysis is made before the code was greatly optimized. Although I am pretty sure the below stated result still apply since the optimization only improved the coefficent
Using logs generated by an overnight run I made. A complexity a little better than O(n sqrt n) can be estimated. Below are two graphs that demonstrates it:
This project is mainly made for fun and for me to learn the C language. I'm aware that a lot of improvements can be made. I don't plan to use the data here for anything too serious, I am just listing it here in case someone would find it useful
If you want to see some actual research about this topic and an implimentation made on a supercomputer, check out