I don't know any <em><u>slick</u></em> way to do this. I would just list the prime numbers
between 40 and 50 and test them one at a time.
The prime numbers between 40 and 50 are: 41, 43, 47
<u>Test 41:</u>
-- add 1 . . . 42
-- prime factors of 42 . . . 2, 3, 7
-- sum of the factors . . . 12
<u>Test 43:</u>
-- add 1 . . . 44
-- prime factors of 44 . . . 2, 11
-- sum of the factors . . . 13
<u>Test 47:</u>
-- add 1 . . . 48
-- prime factors of 48 . . . 2, 3,
-- sum of the factors . . . 5
Maybe I'm not understanding how to list prime factors, but so far,
I haven't found any number that answers the question.
Maybe if I write the prime factorization of 44 like this:
44 = 2 * 2 * 11
Now the items in the prime factorization do add up to 15.
So the answer would seem to be <em>43.</em>
I would suggest asking your teacher for help that seems like a lot... :(
No it doesn’t because in a function you can’t use a number twice on an input or output
Answer:
All your steps are correct. Well done!
X=9 hope it helps..................