Prime Sums Challenge  

  RSS

0

 We all know (hopefully) how to find the prime factors/divisors of a number. Like the prime factors of 210 are {2, 3, 5, 7}, or that the prime factors of 567's prime factors are {3, 3, 3, 3, 7}, because the product of those primes equals your number. But what about the sum? More specifically, how do we find all of the numbers who's prime factors add up to some certain number? How many are there?

That is your challenge: come up with a computer program to find all of the numbers who's prime factors add up to some "n". Call your function "dSet". Here are some examples of what I mean:

5-Set = {5 ({5}), 6 ({3, 2})}

7-Set = {7 ({7}), 10 ({2, 5}), 12({2, 2, 3})}

10-Set = {21 ({3, 7}), 25 ({5, 5}), 30 ({2, 3, 5}), 32 ({2, 2, 2, 2, 2}), 36 ({3, 3, 4})}

That one guy that's always on

 
0

Do these numbers have a name? Numbers who's factors sum to make the same number are perfect (sum of all factors not necessarily just prime factors). 

I can see in your examples "6 ({3, 2})" which of course is perfect as well as fitting Lucas's criteria. I would love to see if whoever made this code could highlight the perfect numbers who are part of this set (however I have a feeling that 6 may be the only one which will work).  

PlanckTime - Amin

6 is the only perfect number in the 5-Set, but I will see in other d-Sets. I've already finished my code, I'm just waiting for other people to see this post and give it a go. I'm not sure these have a name, I just know that they are important for something I'm doing.

Wait Lucas, 5 isn't perfect.

I had meant elements in the set, but I changed it anyway.

0

My answer here

Fun fact, in order to get just three perfect numbers in there, you needed to go up to 39 (as 496 = 24·31, which sums to 39)! Way higher than expected

That one guy that's always on

 
Share:
  
Working

Please Login or Register