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)


 
numimpar = 1
contar = 0
sumaDiv = 0
 
function SumaDivisores(n)
	# Devuelve la suma de los divisores propios de n
	suma = 1
	i = int(sqr(n))
 
	for d = 2 to i
		if n % d = 0 then
			suma += d
			otroD = n \ d
			if otroD <> d Then suma += otroD
		end if
	Next d
	Return suma
End Function
 
# Encontrar los números requeridos por la tarea:
# primeros 25 números abundantes impares
Print "Los primeros 25 números impares abundantes:"
While contar < 25
	sumaDiv = SumaDivisores(numimpar)
	If sumaDiv > numimpar Then
		contar += 1
		Print numimpar & " suma divisoria adecuada: " & sumaDiv
	End If
	numimpar += 2
End While
 
# 1000er número impar abundante
While contar < 1000
	sumaDiv = SumaDivisores(numimpar)
	If sumaDiv > numimpar Then contar += 1
	numimpar += 2
End While
Print Chr(10) & "1000º número impar abundante:"
Print "   " & (numimpar - 2) & " suma divisoria adecuada: " & sumaDiv
 
# primer número impar abundante > mil millones (millardo)
numimpar = 1000000001
encontrado = False
While Not encontrado
	sumaDiv = SumaDivisores(numimpar)
	If sumaDiv > numimpar Then
		encontrado = True
		Print Chr(10) & "Primer número impar abundante > 1 000 000 000:"
		Print "    " & numimpar & " suma divisoria adecuada: " & sumaDiv
	End If
	numimpar += 2
End While
End
 