Problem 44065. Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them.
example:
n=14 ; EvenDivisors={2,14} ; y=2
n=68 ; EvenDivisors={2,34,4,68} ; y=4
Similar problems are: https://www.mathworks.com/matlabcentral/cody/problems/42791-number-of-divisors-of-a-given-number https://www.mathworks.com/matlabcentral/cody/problems/1025-divisors-of-an-integer
n=64 ; EvenDivisors={2,4,8,16,32} ; y=5
Solution Stats
Problem Comments
-
1 Comment
For n=64, wouldn't the correct answer be 6, since 64 itself is also even? If you're not counting the number itself as a divisor, then the answers above for n=14 and n=68 would be incorrect.
Solution Comments
Show commentsProblem Recent Solvers46
Suggested Problems
-
Remove the polynomials that have positive real elements of their roots.
1670 Solvers
-
Back to basics 22 - Rotate a matrix
901 Solvers
-
Determine if input is a Narcissistic number
197 Solvers
-
Circular Primes (based on Project Euler, problem 35)
495 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
599 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!