6 lines
203 B
Text
6 lines
203 B
Text
fcn smithNumbers(N=0d10_000){ // -->(Smith numbers to N)
|
|
[2..N].filter(fcn(n){
|
|
(pfs:=primeFactors(n)).len()>1 and
|
|
n.split().sum(0)==primeFactors(n).apply("split").flatten().sum(0)
|
|
})
|
|
}
|