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.

Range: 0 - 33,270,000,000. Tilde (~) delimited. SHA‑256: C59E2A92388852E900FB0B5F0D36AD7E82F26004434B454A2C5338EB7D83D80F; 66,587 bytes

Range: 0 - 33,270,000,000. Tilde (~) delimited. SHA‑256: 74F1E2DDD609A500C1B1E86CDD76F391A466F948AA9296067B75B439E9C37E2A; 3,209 bytes

Range: 0 - 32,768. Tilde (~) delimited. SHA-256: 6A0DF4C344EDFAB8E829881F48CE2CCB2981031718C052A032C576CEA1D091F2; 359,394 bytes

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:

Y-axis in seconds. X-axis is from 0 to 1.17 billion.

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