4 lines
226 B
Text
4 lines
226 B
Text
fcn properDivs(n){ [1.. (n + 1)/2 + 1].filter('wrap(x){ n%x==0 and n!=x }) }
|
|
const N=20000;
|
|
sums:=[1..N].pump(T(-1),fcn(n){ properDivs(n).sum(0) });
|
|
[0..].zip(sums).filter('wrap([(n,s)]){ (n<s<=N) and sums[s]==n }).println();
|