Line 1 ~ Think of any number call it n.
Line 2 ~ Multiply all of its digits together ~ maybe do not choose a huge number in the first place! Call the result n2
Line 3 ~ Treat the result in the same way as line 1.
Line 4 ~ Repeat ~ to obtain n2 ~ n3 ~ ... ~ etc ~ until something happens
Line 5 ~ Call the final number you have reached the persistence of n ~ let nx be called p
Line 6 ~ Make a table of values you have calculated to save ever having to do all the work again next time.
I have started the table, and it is available for you to add to it ~ it is at [114077] .