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)


*        Abundant odd numbers      18/09/2019
ABUNODDS CSECT
         USING  ABUNODDS,R13       base register
         B      72(R15)            skip savearea
         DC     17F'0'             savearea
         SAVE   (14,12)            save previous context
         ST     R13,4(R15)         link backward
         ST     R15,8(R13)         link forward
         LR     R13,R15            set addressability
         LA     R8,0               n=0 
         LA     R6,3               i=3 
       DO WHILE=(C,R8,LT,NN1)      do i=3 by 2 until n>=nn1 
         BAL    R14,SIGMA            s=sigma(i)
       IF    CR,R9,GT,R6 THEN        if s>i then
         LA     R8,1(R8)               n++
         BAL    R14,PRINT              print results
       ENDIF    ,                    endif
         LA     R6,2(R6)             i+=2 
       ENDDO    ,                  enddo i
         LA     R8,0               n=0 
         LA     R6,3               i=3 
         XR     R1,R1              f=false 
       DO WHILE=(C,R1,EQ,=F'0')    do i=3 by 2 while not f
         BAL    R14,SIGMA            s=sigma(i)
       IF    CR,R9,GT,R6 THEN        if s>i then
         LA     R8,1(R8)               n++
       IF      C,R8,GE,NN2 THEN        if n>=nn2 then
         BAL    R14,PRINT                print results
         LA     R1,1                     f=true
       ENDIF    ,                      endif
       ENDIF    ,                    endif
         LA     R6,2(R6)             i+=2
       ENDDO    ,                  enddo i
         LA     R8,0               n=0 
         L      R6,NN3             i=mm3 
         LA     R6,1(R6)           +1
         XR     R1,R1              f=false 
       DO WHILE=(C,R1,EQ,=F'0')    do i=nn3+1 by 2 while not f
         BAL    R14,SIGMA            s=sigma(i)
       IF    CR,R9,GT,R6 THEN        if s>i then
         BAL    R14,PRINT              print results
         LA     R1,1                   f=true
       ENDIF    ,                    endif
         LA     R6,2(R6)             i+=2
       ENDDO    ,                  enddo i
         L      R13,4(0,R13)       restore previous savearea pointer
         RETURN (14,12),RC=0       restore registers from calling save
SIGMA    CNOP   0,4                ---- subroutine sigma
         LA     R9,1               s=1
         LA     R7,3               j=3 
         LR     R5,R7              j
         MR     R4,R7              j*j
       DO WHILE=(CR,R5,LT,R6)      do j=3 by 2 while j*j<i 
         LR     R4,R6                i
         SRDA   R4,32                ~
         DR     R4,R7                i/j
       IF   LTR,R4,Z,R4 THEN         if mod(i,j)=0 then
         AR     R9,R7                  s+j
         LR     R4,R6                  i
         SRDA   R4,32                  ~
         DR     R4,R7                  i/j
         AR     R9,R5                  s=s+j+i/j
       ENDIF    ,                    endif
         LA     R7,2(R7)             j+=2 
         LR     R5,R7                j
         MR     R4,R7                j*j
       ENDDO    ,                  enddo j
       IF    CR,R5,EQ,R6 THEN      if j*j=i then
         AR     R9,R7              s=s+j
       ENDIF    ,                  endif
         BR     R14                ---- end of subroutine sigma
PRINT    CNOP   0,4                ---- subroutine print
         XDECO  R8,XDEC            edit n
         MVC    BUF(4),XDEC+8      output n
         XDECO  R6,BUF+14          edit & output i
         XDECO  R9,BUF+33          edit & output s
         XPRNT  BUF,L'BUF          print buffer
         BR     R14                ---- end of subroutine print
NN1      DC     F'25'              nn1=25
NN2      DC     F'1000'            nn2=1000
NN3      DC     F'1000000000'      nn3=1000000000
BUF      DC     CL80'.... - number=............ sigma=............'
XDEC     DS     CL12               temp for edit
         REGEQU                    equate registers
         END    ABUNODDS