I am a mathematician who is interested in the product of non-gaussian primes. A prime p is called non-gaussian, if p mod 4 = 1.
It is easy to generate an ongoing list of natural numbers in Python:
natural_numbers = [1,2,3,4,5]
natural_numbers.append(natural_numbers[-1]+1)
I can just extend this list whenever I need it to be longer. But what if I am interested in numbers that only have non-gaussian primes as prime factors?
product_of_non_gaussian_primes = [5,13,17,29,37,41,53,61,65]
product_of_non_gaussian_primes.append(???)
Checking the prime factorization of the following numbers until one happens to only have non-gaussian primes seems quite inefficient. I was wondering if there is a better way.