7 lines
205 B
Text
7 lines
205 B
Text
AttractiveNumber(N):=block([Q:0],
|
|
if not primep(N) then (
|
|
if primep(apply("+", map(lambda([Z], Z[2]), ifactors(N)))) then Q: N
|
|
), Q
|
|
)$
|
|
|
|
delete(0, makelist(AttractiveNumber(K), K, 1, 120));
|