RosettaCodeData/Task/Arithmetic-Rational/PARI-GP/arithmetic-rational.parigp

6 lines
66 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
for(n=2,1<<19,
s=0;
fordiv(n,d,s+=1/d);
if(s==2,print(n))
)