Abundant odd numbers: Difference between revisions

Line 2,775:
 
=={{header|Frink}}==
Frink contains efficient functions for finding the factors of a number. It uses trial division, wheel factorization, and Pollard rho factorization.
 
<lang frink>isAbundantOdd[n] := sum[allFactors[n, true, false]] > n
 
Line 2,796 ⟶ 2,794:
 
println["\nThe thousandth abundant odd number:"]
n = 31
count = 0
do
{
n = n + 2
 
if isAbundantOdd[n]
count = count + 1
 
n = n + 2
} until count == 1000
 
Line 2,816 ⟶ 2,815:
until isAbundantOdd[n]
 
println["$n: proper divisor sum " + sum[allFactors[n, 1, false]]]</lang>
</lang>
{{out}}
<pre>
Line 2,847 ⟶ 2,848:
 
The thousandth abundant odd number:
492977492975: proper divisor sum 1423519361
 
The first abundant odd number over 1 billion:
490

edits