Barbara writes a sequence of integers starting with the number 12. Each subsequent integer she writes is chosen randomly with equal probability from amongst the positive divisors of the previous integer (including the possibility of the integer itself). She keeps writing integers until she writes the integer 1 for the first time, and then she stops.
An example of one such sequence is 12, 6, 6, 3, 3, 3, 1.
What is the expected value of the number of terms in Barbara’s sequence?