ok, that is a little different than since in #1 you asked to avoid 2 numbers...
B4X:
Dim intNewNumber As Int = Rnd(1, 10), intOldNumber as Int = intNewNumber
'
Do Until intNewNumber <> intOldNumber
intNewNumber = Rnd(1, 10)
Loop
intOldNumber = intNewNumber
Put all the levels in a list in a random order. Then, take a random one from the first 8 (assuming 10 levels and 2 barred). Then, simply put the used one at the end of the list. The next time, just re-use the list.