Proper divisors: Difference between revisions

Content deleted Content added
Add ref.
1 has no proper divisors.
Line 3:
 
For example the proper divisors of 6 are 1, 2, and 3. The proper divisors of 100 are 1, 2, 4, 5, 10, 20, 25, and 50.
 
'''Note''' that 1 has no proper divisors.
 
;Task:
Line 15 ⟶ 17:
 
=={{header|D}}==
{{incorrect|D|1 has no proper divisors.}}
{{trans|Python}}
Currently the lambda of the filter allocates a closure on the GC-managed heap.
Line 32 ⟶ 35:
 
=={{header|J}}==
{{incorrect|J|1 has no proper divisors.}}
 
The proper divisors of an integer are the [[Factors of an integer]] without the integer itself.
Line 69 ⟶ 73:
 
=={{header|Java}}==
{{incorrect|Java|1 has no proper divisors.}}
{{works with|Java|1.5+}}
<lang java5>import java.util.Collections;
Line 116 ⟶ 121:
 
=={{header|Perl}}==
{{incorrect|Perl|1 has no proper divisors.}}
===Using a module for divisors===
{{libheader|ntheory}}
Line 160 ⟶ 166:
 
=={{header|Python}}==
{{incorrect|Python|1 has no proper divisors.}}
===Python: Literal===
A very literal interpretation