Skip to content

Instantly share code, notes, and snippets.

@hoffmanc
Created July 7, 2010 17:41
Show Gist options
  • Save hoffmanc/466985 to your computer and use it in GitHub Desktop.
Save hoffmanc/466985 to your computer and use it in GitHub Desktop.
D <- function(n) sum((1:(n-1))[n%%1:(n-1)==0])==n
(2:9000)[sapply(2:9000,D)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment