Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A easy matlab question. use matlab please I will give thumb up Weird integers (20+ 10 = 30 points) We say that a positive integer

A easy matlab question. use matlab please
I will give thumb up
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions