RosettaCodeData/Task/Proper-divisors/R/proper-divisors-1.r
2023-07-01 13:44:08 -04:00

4 lines
222 B
R

# Proper divisors. 12/10/16 aev
require(numbers);
V <- sapply(1:20000, Sigma, k = 0, proper = TRUE); ind <- which(V==max(V));
cat(" *** max number of divisors:", max(V), "\n"," *** for the following indices:",ind, "\n");