The Prime Counting Function model uses the trial division algorithm to compute the number of primes less than or equal to the number n. Although the trial division algorithm is inefficient, we use it to perform a lengthy calculation while a standard EJS simulation thread accumulates and plots data from the parallel computation. Users can vary the number of independent threads and observe the computational time.

The Prime Counting Function Model was created using the Easy Java Simulations (EJS) modeling tool. It is distributed as a ready-to-run (compiled) Java archive. Double clicking the model's jar file will run the simulation if Java is installed.

Please note that this resource requires
at least version 1.6 of
Java.

Prime Counting Function Source Code
The source code zip archive contains an XML representation of the Prime Counting Function Model. Unzip this archive in your Ejs workspace to compile and run this model using Ejs. download 19kb .zip
Last Modified: October 11, 2013

W. Christian, Computer Program PRIME COUNTING FUNCTION MODEL, Version 1.0 (2013), WWW Document, (http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596).

W. Christian, Computer Program PRIME COUNTING FUNCTION MODEL, Version 1.0 (2013), <http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596>.

Christian, W. (2013). Prime Counting Function Model (Version 1.0) [Computer software]. Retrieved September 26, 2016, from http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596

Christian, Wolfgang. "Prime Counting Function Model." Version 1.0. http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596 (accessed 26 September 2016).

%A Wolfgang Christian %T Prime Counting Function Model %D October 11, 2013 %U http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596 %O 1.0 %O application/java

%0 Computer Program %A Christian, Wolfgang %D October 11, 2013 %T Prime Counting Function Model %7 1.0 %8 October 11, 2013 %U http://www.compadre.org/Repository/document/ServeFile.cfm?ID=13030&DocID=3596

Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.