Factoring numbers with interfering random waves