List unitary divisors of a number - MATLAB Cody - MATLAB Central

Problem 56738. List unitary divisors of a number

Difficulty:Rate
A unitary divisor d of a number n divides n and satisfies gcd(d,n/d) = 1. For example, 9 is a unitary divisor of 18 because gcd(9,2) = 1. However, 3 is not a unitary divisor of 18 because gcd(3,6) = 3, and 7 is not a unitary divisor because it does not divide 18.
Write a function to list the unitary divisors of the input number in ascending order.

Solution Stats

80.0% Correct | 20.0% Incorrect
Last Solution submitted on Jun 23, 2024

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
6

Problem Recent Solvers12

Suggested Problems

More from this Author304

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!