Refactorable Number

Author

Eric W. Weisstein
December 16, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/RefactorableNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RefactorableNumber.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

RefactorableQ[n_Integer?Positive]:=Mod[n,DivisorSigma[0,n]]===0
SetAttributes[RefactorableQ,Listable]

Enumeration

Take[ref=Select[Range[10^7],RefactorableQ],100]//Timing

pairs=ref[[Position[-Subtract@@@Partition[ref,2,1],1]//Flatten]]