An Abundant number is a number n for which the   sum of divisors   σ(n) > 2n,

or,   equivalently,   the   sum of proper divisors   (or aliquot sum)       s(n) > n.



E.G.

12   is abundant, it has the proper divisors     1,2,3,4 & 6     which sum to   16   ( > 12 or n);

       or alternately,   has the sigma sum of   1,2,3,4,6 & 12   which sum to   28   ( > 24 or 2n).



Abundant numbers are common, though even abundant numbers seem to be much more common than odd abundant numbers.

To make things more interesting, this task is specifically about finding   odd abundant numbers.



Task
Find and display here: at least the first 25 abundant odd numbers and either their proper divisor sum or sigma sum.
Find and display here: the one thousandth abundant odd number and either its proper divisor sum or sigma sum.
Find and display here: the first abundant odd number greater than one billion (109) and either its proper divisor sum or sigma sum.


References

   OEIS:A005231: Odd abundant numbers (odd numbers n whose sum of divisors exceeds 2n)
   American Journal of Mathematics, Vol. 35, No. 4 (Oct., 1913), pp. 413-422 - Finiteness of the Odd Perfect and Primitive Abundant Numbers with n Distinct Prime Factors (LE Dickson)


on aliquotSum(n)
    if (n < 2) then return 0
    set sum to 1
    set sqrt to n ^ 0.5
    set limit to sqrt div 1
    if (limit = sqrt) then
        set sum to sum + limit
        set limit to limit - 1
    end if
    repeat with i from 2 to limit
        if (n mod i is 0) then set sum to sum + i + n div i
    end repeat
 
    return sum
end aliquotSum
 
-- Task code:
local output, counter, n, sum, astid
set output to {"The first 25 abundant odd numbers:"}
set counter to 0
set n to 1
repeat until (counter = 25)
    set sum to aliquotSum(n)
    if (sum > n) then
        set end of output to "  " & n & "  (proper divisor sum:  " & sum & ")"
        set counter to counter + 1
    end if
    set n to n + 2
end repeat
 
set end of output to "The one thousandth:"
repeat until (counter = 1000)
    set sum to aliquotSum(n)
    if (sum > n) then set counter to counter + 1
    set n to n + 2
end repeat
set end of output to "  " & (n - 2) & "  (proper divisor sum:  " & sum & ")"
 
set end of output to "The first > 1,000,000,000:"
set n to 1.000000001E+9
set sum to aliquotSum(n)
repeat until (sum > n)
    set n to n + 2
    set sum to aliquotSum(n)
end repeat
set end of output to "  " & (n div 1000000) & text 2 thru -1 of ((1000000 + ((n mod 1000000) as integer)) as text) & ¬
    "  (proper divisor sum:  " & (sum div 1000000) & text 2 thru -1 of ((1000000 + ((sum mod 1000000) as integer)) as text) & ")"
 
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to linefeed
set output to output as text
set AppleScript's text item delimiters to astid
return output