https://wikimass.com/python/composite-number