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)


        .model  tiny
        .code
        .486
        org     100h
;ebp=counter, edi=Num, ebx=Div, esi=Sum
start:  xor     ebp, ebp        ;odd abundant number counter:= 0
        mov     edi, 3          ;Num:= 3
ab10:   mov     ebx, 3          ;Div:= 3
        mov     esi, 1          ;Sum:= 1
ab20:   mov     eax, edi        ;Quot:= Num/Div
        cdq                     ;edx:= 0
        div     ebx             ;eax(q):edx(r):= edx:eax/ebx
        cmp     ebx, eax        ;if Div > Quot then quit loop
        jge     ab50
         test   edx, edx        ;if remainder = 0 then
         jne    ab30
          add   esi, ebx        ;  Sum:= Sum + Div
          cmp   ebx, eax        ;  if Div # Quot then
          je    ab30
          add   esi, eax        ;    Sum:= Sum + Quot
ab30:    add    ebx, 2          ;Div:= Div+2 (only check odd Nums)
         jmp    ab20            ;loop
ab50:
        cmp     esi, edi        ;if Sum > Num then
        jle     ab80
        inc     ebp             ;  counter:= counter+1
        cmp     ebp, 25         ;  if counter<=25 or counter>=1000 then
        jle     ab60
         cmp    ebp, 1000
         jl     ab80
ab60:   mov     eax, edi        ;    print Num
        call    numout
        mov     al, ' '         ;    print spaces
        int     29h
        int     29h
        mov     eax, esi        ;    print Sum
        call    numout
        mov     al, 0Dh         ;    carriage return
        int     29h
        mov     al, 0Ah         ;    line feed
        int     29h
        cmp     ebp, 1000       ;    if counter = 1000 then
        jne     ab65
         mov    edi, 1000000001-2 ;    Num:= 1,000,000,001 - 2
ab65:   cmp     edi, 1000000000 ;      if Num > 1,000,000,000 then exit
        jg      ab90
ab80:   add     edi, 2          ;Num:= Num+2 (only check odd Nums)
        jmp     ab10            ;loop
ab90:   ret
 
;Print signed integer in eax with commas, e.g: 12,345,010
numout: xor     ecx, ecx        ;digit counter:= 0
no00:   cdq                     ;edx:= 0
        mov     ebx, 10         ;Num:= Num/10
        div     ebx             ;eax(q):edx(r):= edx:eax/ebx
        push    edx             ;remainder = least significant digit
        inc     ecx             ;count digit
        test    eax, eax        ;if Num # 0 then NumOut(Num)
        je      no20
         call   no00
no20:   pop     eax             ;print digit + '0'
        add     al, '0'
        int     29h
        dec     ecx             ;un-count digit
        je      no30            ;if counter # 0 and
         mov    al, cl          ;  if remainder(counter/3) = 0 then
         aam    3
         jne    no30
          mov   al, ','         ;    print ','
          int   29h
no30:   ret
        end     start