# Multiplication Persistence

Multiplication Persistence

How to calculate Multiplication Persistence:

1. Start with a number.

2. Multiply its digits together. This gives you a new number.

3. Repeat 2. until you end up with a 1-digit number.

4. Count up how many times you have multiplied the digits together.

This is the Multiplication Persistence of the number you have started with!

2. Multiply its digits together. This gives you a new number.

3. Repeat 2. until you end up with a 1-digit number.

4. Count up how many times you have multiplied the digits together.

This is the Multiplication Persistence of the number you have started with!

The code:

persistence[n_,t_]:=If[Length[IntegerDigits[n]]≤1,t,persistence[Last[FoldList[#1#2&,IntegerDigits[n]]],t+1]]persistence[n_]:=persistence[n,0]

In[]:=

277777788888899 has the world record largest persistence:

persistence[277777788888899]

In[]:=

11

Out[]=

A “graph” of all 2-digit numbers connected to the result when you multiply its digits:

Graph[Table[nLast[FoldList[#1#2&,IntegerDigits[n]]],{n,0,99}],VertexLabels"Name"]

In[]:=

Out[]=

Three digits (only showing connections, all numbers would be a mess):

Graph[Table[nLast[FoldList[#1#2&,IntegerDigits[n]]],{n,0,999}]]

In[]:=

Out[]=

277777788888899 is the smallest number with a persistence of 11.

The largest known is 77777733332222222222222222222:

The largest known is 77777733332222222222222222222:

persistence[77777733332222222222222222222]

In[]:=

11

Out[]=

They’ve checked up to 233-digit numbers. That’s numbers this big...

10^233

In[]:=

100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Out[]=

As you can see, we’re talking about numbers that are quite big. Yet, we haven’t found that many “11-step numbers” and no “12-step numbers” yet! Thus, we think that we’ll never find any more numbers with a persistence of ≥11, although nobody knows that for sure! However, we are looking. Below is a real search that will (maybe) find them for us !

cur=Last[FoldList[10#1+#2&,Table[2,234]]]Manipulate[If[run=="Run",While[IntegerDigits[cur]≠Sort[IntegerDigits[cur]],cur=cur+If[run=="Run",1,0]],0];Dynamic[Column[{cur,persistence[cur]}]],{run,{"Pause","Run"}}]

In[]:=

222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222

Out[]=

Out[]=

This code works with a few efficiencies:

1. They’ve already checked up to 10^233, so we don’t have to check those again.

2. We can rearrange the digits, and the multiplication will be the same. So we don’t have to check any of the rearrangements of any of the numbers we’ve already checked.

3

3a. We should never put in a 0 (a digit of the number). Because then you would be multiplying by 0, which would result in 0 in 1 step!

3b. We should also never put in a 5 and an even number. Because, in the next step, the number would be divisible both by 5 and by 2, so it’s also divisible by 10. That would put a 0 in the answer, which we saw we should never do!

3c. With similar reasoning (assuming we want to find the smallest number of the type we want), we’ll see we should never put in:

- Two 5s

- A 5 and a 7

- When we put in a... (- means anything, the order doesn’t matter):

1,- , remove the 1

2,2, put 4 instead

2,3, put 6 instead

2,4, put 8 instead

3,3, put 9 instead

So, we can reduce the search space and time collossaly, with just some logic!

1. They’ve already checked up to 10^233, so we don’t have to check those again.

2. We can rearrange the digits, and the multiplication will be the same. So we don’t have to check any of the rearrangements of any of the numbers we’ve already checked.

3

3a. We should never put in a 0 (a digit of the number). Because then you would be multiplying by 0, which would result in 0 in 1 step!

3b. We should also never put in a 5 and an even number. Because, in the next step, the number would be divisible both by 5 and by 2, so it’s also divisible by 10. That would put a 0 in the answer, which we saw we should never do!

3c. With similar reasoning (assuming we want to find the smallest number of the type we want), we’ll see we should never put in:

- Two 5s

- A 5 and a 7

- When we put in a... (- means anything, the order doesn’t matter):

1,- , remove the 1

2,2, put 4 instead

2,3, put 6 instead

2,4, put 8 instead

3,3, put 9 instead

So, we can reduce the search space and time collossaly, with just some logic!