def loop(n,depth): """generates numbers containing "depth" primes, up to n""" if depth==0: #generates the powers of two num1=1 while num1