Proper divisors: Difference between revisions

m
Line 4,333:
divisorList<-Vectorize(divisors)(1:N)
numberWithMostDivisors<-which.max(lengths(divisorList))
return(paste0("The number with the most proper divisors between 1 and ",N,
" is ",numberWithMostDivisors,
". It has ",length(divisorList[[numberWithMostDivisors]])," proper divisors."))
}
mostProperDivisors(20000)</lang>
Line 4,374:
#Task 3
> mostProperDivisors(20000)
[1] "The number with the most proper divisors between 1 and 20000 is 15120. It has 79 proper divisors."</pre>
 
=={{header|Racket}}==
331

edits