-
Greetings! I am Torleif Berger, 24 years old, a Seventh-Day Adventist and currently working as a software developer. Otherwise, not much to tell. Although I do juggle a bit...
-
Async Best practices Big Int Blogging Books C# Collatz conjecture Command line Embedded Resources Events Factorization Fibonacci Genders Hashing Java Latex Mac Math Media Men MySql Nerd Null NUnit Palindromes Plugins Primes Pythagorean triplets Python Sieve of Atkin Sieve of Eratosthenes Snippet Sorting Sql Subversion TDD Threading Tools Triangle Numbers Tutorial Unit-Testing Unix WinForms WordPress YouTube
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Tag Archives: Primes
The Sieve of Eratosthenes in C#
In some of the Project Euler problems we have needed a source of primes. One algorithm for finding primes is called the Sieve of Eratosthenes. This algorithm is both pretty simple to understand and to implement. It is also fairly fast and usable, at least for the lower primes.
My implementation is based upon the algorithm [...]
Project Euler: Problem 10
The sum of the primes below 10 is
Find the sum of all the primes below two million.
Project Euler: Problem 7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10001st prime number?
Project Euler: Problem 3
The third Euler problem has to do with prime factorization:
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143?


















The Sieve of Atkin in C#