## Archive for the 'Maths' Category

16
Jul
12

### Finding Primes: Part II – A Python Implementation

As it is easy to get started I first wrote a prime finding algorithm in Python. I used a very basic algorithm for this. I store a list of prime numbers, and I check the numbers less than the square root of the possible prime, if any are a factor of the number I’m checking then it’s a composite otherwise I append it to the list of prime numbers.

The code for this is on my Box account here. Continue reading ‘Finding Primes: Part II – A Python Implementation’

16
Jul
12

### Finding Primes: Part I

Over the last week or so I’ve been working on some old code of mine. As the title of this post suggests it is to do with that odd pastime of mathematicians: finding prime numbers. I have made a few attempts to make lists of prime numbers over the years in numerous different ways. This is a small introduction to what will no doubt be a small series of many posts. This is an on going work in C++ although I’ll also be writing about an implementation I wrote in Python and a discussion of why I no longer use it for large calculations. During this process I have also taught myself to use git and in particular GitHub. So if you are interested in being ahead of my posts here is my GitHub and in particular this project.