Set the number as a unique index and catch an error where a duplicate is found. Or just use the MySQL function RAND() to generate the number instead, then retrieve the value.
You could possibly do it in a single INSERT statement. Something like this (although this particular example slows down dramatically as the number of rows increases)
INSERT INTO numbers (SomeNumber)
SELECT aNum
FROM (SELECT a.i+b.i*10+c.i*100+d.i*1000+e.i*10000 AS aNum
FROM integers a, integers b, integers c, integers d, integers e) Sub1
LEFT JOIN Numbers ON Sub1.aNum = Numbers.SomeNumber
WHERE Numbers.SomeNumber IS NULL
ORDER BY RAND()
LIMIT 1
Or a lot more efficient, but leaves the possibility that no row will be inserted (it generates 10 random numbers and picks one that is unused to insert), hence you would need to check the rows affected and if 0 try again:-
INSERT INTO numbers (SomeNumber)
SELECT aNum
FROM (SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum) Sub1
LEFT JOIN Numbers ON Sub1.aNum = Numbers.SomeNumber
WHERE Numbers.SomeNumber IS NULL
LIMIT 1
With both these examples you could retrieve the id of the inserted row and then from that select the number inserted.