Finding a solution to this problem can be done with the following Mathematica program.

PerfectQ [n_]:=Apply[Plus,Divisors[n]]== 2n

PerfectSearch[n_]:=Select[Range [n],PerfectQ]

PerfectSearch[10000]

{6,28,496,8128}

See also: An Introduction to Programming with Mathematica

## No comments:

## Post a Comment