Question: Wolfram language (Mathmatica Programming) (a) Write a function which takes as input a positive integer n and returns the sum of all proper divisors of
Wolfram language (Mathmatica Programming)
(a) Write a function which takes as input a positive integer n and returns the sum of all proper divisors of n. Show how your function works for the following values of n : 2, 3, 4, 6, 30, 900.
(b) Using the function you wrote in (a) write a function perfectQ which takes as input a positive integer n and returns true if n is perfect and false if not. Note : proper divisors of n can not be greater than n/2. Use the function to find all perfect numbers n <= 1000.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
