https://lush93md.medium.com/leetcode-2507-smallest-value-after-replacing-with-sum-of-prime-factors-1c9c69a64ef3