Question: I've been asked to create a procedure that lists pairs of Amicable Numbers

Here is my code but I'm having trouble getting it to work

d := sigma(m)-m; Amicable := proc (m) local n; for m from 2 to 100000 do n := d(m); if d(n) = m then print*m, n end if end do end proc

Would appreciate any advice you guys might have.

Thanks.

Please Wait...