def primeGen(n):
        """
        After the first 5 primes the next prime number is the sum of  the last 2
        minus the three prime numbers back
        if it is not a prime number we go for the next one
        
        """
        primes= [2,3,5,7,11]
        if n in xrange(1,len(primes)+1):
            return primes[:n]
        else:
            banlist=[]
            count = 6
            while count <= n :
                Next = (primes[-2] + primes[-1]) - primes[-3]
                if not is_prime(Next):
                    count -=1
                    banlist.append(Next)
                count +=1
                primes.append(Next)
            filterout(banlist,primes)
            return primes

        After the first 5 primes the next prime number is the sum of  the last 2
        minus the three prime numbers back
        if it is not a prime number we go for the next one
        
        
recipes/Python/577259_Find_Prime_Numbers_in_python_/recipe-577259.py