Question: Matlab code pleaseI will give thumbs up matlab code please its easy Weird integers (20+ 10 = 30 points) We say that a positive integer

Matlab code pleaseI will give thumbs up
Matlab code pleaseI will give thumbs up matlab code please its easy
matlab code please its easy
Weird integers (20+ 10 = 30 points) We say that a positive

Weird integers (20+ 10 = 30 points) We say that a positive integer is weird if the sum of its divisors, including 1 but excluding itself, is larger than that integer, and no subsets of those divisors sims to that integer. Example: 70 is a weird integer because its divisors, including 1 but excluding itself, are 1.2.5.7. 10.14.35. We have 1 + 2 + 5 + 7 + 10 + 14 + 35 = 74 > 70, and no subsets of {1.2.5, 7.10.14.35) sumns to 70. Non-example: 12 is NOT a weird integer because its divisors, including 1 but excluding itself, are 1. 2. 3. 4.6. Even though 1+2+3+4+6 = 16 > 12, the subset {2,4,6} c{1.2.3.4,6} sums to 2+4 +6 = 12. You can easily verify by hand that there does not exist any single digit weird integer, i.e., all positive integers smaller than 10 are NOT weird. It turns out that 70 is the only possible two digit weird integer but this gets tedions to verify by hand. Computers can help. Write a MATLAB script Yourlastnameyourfirstname Hw2p2.m that takes two positive in- tegers Nin, Wux as inputs where in 70, and no subsets of {1.2.5, 7.10.14.35) sumns to 70. Non-example: 12 is NOT a weird integer because its divisors, including 1 but excluding itself, are 1. 2. 3. 4.6. Even though 1+2+3+4+6 = 16 > 12, the subset {2,4,6} c{1.2.3.4,6} sums to 2+4 +6 = 12. You can easily verify by hand that there does not exist any single digit weird integer, i.e., all positive integers smaller than 10 are NOT weird. It turns out that 70 is the only possible two digit weird integer but this gets tedions to verify by hand. Computers can help. Write a MATLAB script Yourlastnameyourfirstname Hw2p2.m that takes two positive in- tegers Nin, Wux as inputs where in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!