|
MAPLE
|
P:= proc(p) local a, b, m, n, i, ok, t1, t2, t3; a:=0; for n from 0 by 1 to p do
b:=1000000000039; ok:=0; if n<=1 then a:=0; ok:=1; fi; if isprime(n) then a:=1; ok:=1; fi; if ok=0 then t1:=ifactor(b*n); m:=nops(t1); t2:=0; for i from 1 to m do t3:=op(i, t1); if nops(t3)=1 then t2:=t2+1/op(t3); else t2:=t2+op(2, t3)/op(op(1, t3)); fi; od;
t2:=t2-1/b; a:=n*t2; fi; if a=2*n then lprint(n, a); fi; od; end: P(100000);
|