#! /usr/bin/env python3 """ pe47.py https://mind.kittttttan.info/py/pe47 """ # https://mind.kittttttan.info/py/pe0 from pe import count_distinct def pe47(d=4): """ Find the first four consecutive integers to have four distinct primes factors. """ i = 14 while 1: rep = 0 while count_distinct(i) == d: rep += 1 i += 1 if rep >= d: print(i - d) return i += 1 if __name__ == "__main__": pe47()