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)


% Integer square root
isqrt = proc (s: int) returns (int)
    x0: int := s / 2
    if x0 = 0 then 
        return(s)
    else
        x1: int := (x0 + s/x0) / 2
        while x1 < x0 do
            x0 := x1
            x1 := (x0 + s/x0) / 2
        end
        return(x0)
    end
end isqrt 
 
% Calculate aliquot sum (for odd numbers only)
aliquot = proc (n: int) returns (int)
    sum: int := 1
    for i: int in int$from_to_by(3, isqrt(n)+1, 2) do
        if n//i = 0 then
            j: int := n / i
            sum := sum + i
            if i ~= j then
                sum := sum + j
            end
        end
    end
    return(sum)
end aliquot
 
% Generate abundant odd numbers
abundant_odd = iter (n: int) yields (int)
    while true do
        if n < aliquot(n) then yield(n) end
        n := n + 2
    end
end abundant_odd
 
start_up = proc ()
    po: stream := stream$primary_output()
 
    count: int := 0
    for n: int in abundant_odd(1) do
        count := count + 1
        if count <= 25 cor count = 1000 then
            stream$putl(po, int$unparse(count) 
                        || ":\t" 
                        || int$unparse(n)
                        || "\taliquot: "
                        || int$unparse(aliquot(n)))
            if count = 1000 then break end
        end
    end
 
    for n: int in abundant_odd(1000000001) do
        stream$putl(po, "First above 1 billion: " 
                        || int$unparse(n)
                        || " aliquot: "
                        || int$unparse(aliquot(n)))
        break
    end
end start_up