Rules are simple - - **First 1000000 primes** not primes below 1000000, should be printed to standard output separated by newlines (primes should be generated within the code) - primes **cannot be generated by an inbuilt functon** or through a library, i.e. use of a inbuilt or library function such as, prime = get_nth_prime(n), is_a_prime(number), or factorlist = list_all_factors(number) won't be very creative, and would not be judged. - Scoring - Say, if we define **Score** = **O**(*f*([number of chars in the code])), *f*(n) being the complexity of your algorithm. So for example, if you have a 300 char code with **O**(n^2) complexity, score is 300^2 = **90000**, for 300 chars with **O**(n*log2(n)), score becomes 300*8.23 = **2468.65** - Use any existing programming language, lowest score wins To verify your solutions, a list of million primes is available [here][1], (it's on google docs, pastebin won't let me upload a 8 Mb file without paying) Please Include these in your solution - - what complexity your program has (include basic analysis if not trivial) - character length of code - the final calculated score This is my first CodeGolf Question so, if there is a mistake or loophole in above rules please do point them out. [1]: https://docs.google.com/open?id=0B2QNmfbXDokqTG9qcjBTQWppLWc