Question: Problem #1-Perfect Numbers A perfect number is a positive integer that equals the sum of all its positive factors (not including the number itself). The



Problem #1-Perfect Numbers A perfect number is a positive integer that equals the sum of all its positive factors (not including the number itself). The first perfect number is 6. It's three factors (1, 2, and 3) all add up to 6. Can you find the next positive number? (Hint: It's somewhere between 20 and 30) As with other numerical research, we can use computer algorithms to do our calculations for us. In the case of finding perfect numbers, we can use MATLAB to create the following plot: 5 1.2 28 O 0.6 0 5 15 20 25 3 34045 50 number The x-axis is simply the numbers from 2 through 50. The y-axis is the factor sum ratio which is simply the sum of the factors of a number divided the number itself. In most cases this ratio is 1 (such as with the number 12). It is the rare instance in which the ratio = 1, that indicates a perfect number lo create this plot, you will need tonais: ttHO MAN AB m-files (details inlk)w) that cxmpuir, factors .-a function that returns all ofthe fac inrs of 2. perfect_numbers - a script that utilizes compute_ factors to create the plot p"sitive inin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
