@Eryndis Well, tell me what exactly you want. Was I correct in guessing that for each i you want the smallest positive n such that tau(n) = i (a partial inverse of tau)? Would any positive n, not necessarily the smallest, such that tau(n) = i be good enough?
My hint about that line of code was not that you would use it in a program, but that you would use it to understand how tau is computed. Once you know how tau is computed, it should be relatively easy to figure out how to write code for a partial inverse that runs in a short amount of time.
Hint 2: For a bunch of different numbers n, look at ifactors(n) and ifactors(tau(n)). What is the pattern?
Here is a related, but simpler, exercise: What are necessary and sufficient conditions for tau(n) to be odd? This one is a standard in mathematical puzzle collections for the general public, although it is always stated in more fanciful form referring to a long hallway of numbered locker doors or pull-chain lights. See http://www.algebra.com/algebra/homework/word/misc/Miscellaneous_Word_Problems.faq.question.51262.html