Description: This is a very simple method to find prime numbers. I use a mathematical function to find non prime numbers. Thus I have compared its efficiency with a code found on Matlab Central, Written by John D'Errico.

The MATLAB file contains a method to find the value of pi. This is just an extension of the general method of finding pi from within a circle. It uses 3D-matrices and some more stuffs, which can be very helpful for educational purposes. Also, do change the values in the file, to see for yourself, how the value depends on the number of random numbers generated..... :)

The algorithm is based on the idea that the next larger prime after one prime is the sum of the two smaller previous minus three prime numbers back. For the first five prime numbers 2,3,5,7,11 this pattern is not true also it is not...

This is an evolutionary algorithm that returns a random list of prime numbers. This code is highly inefficient for a reason. This algorithm is more of a proof of concept that if a prime was a heritable trait, it would not be a desired one.

This recipe demonstrates the runtime addition of a __str__ method to a class instance. This can sometimes be useful for debugging purposes. It also demonstrates the use of the two special attributes of class instances: '__dict__' and '__class__'.

This recipe demonstrates the runtime addition of a __str__ method to a class instance. This can sometimes be useful for debugging purposes. It also demonstrates the use of the two special attributes of class instances: '__dict__' and '__class__'.