# How many different ways can be read a number without repeating the same digit in an arrangement which resembles a triangle?

The problem is as follows:

The figure from belows shows a triangular arrangement where there is a set of numbers. The condition is that in each reading you cannot repeat the same digit and the distance between the digits must be the same and the least. How many different ways can be read the number $$5556789$$?

Supposedly the answer is $$256$$.

I attempted to assign a small number by counting the ways going right and left a-la Pascal triangle of combinatorics.

Which would mean that the number of possibilities will result from summing the numbers at the base of the triangle:

$$1+6+15+20+15+6+1=64$$

Therefore I end up with $$64$$.

But this doesn't seem to be the answer. Can somebody tell me exactly what is the piece of information that I might be missing or missunderstanding?. How can I arrive to the right answer and more importantly how to do this? I appreciate that the answer could use some graphic or visual aid so I could understand what should I do to solve this.

I'm no expert in combinatorics, but it looks like the answer you came up with is valid for the number $$556789$$, whereas the problem states that you are to make the number $$5556789$$ (there's an extra $$5$$ in there).

I expect that if you factor in that extra $$5$$, you'll get an answer of 256.

• Yes, this looks right, OP can repeat a similar procedure where the blue numbers in the second row are 5 6 5 instead of 1 2 1 – hexomino Dec 19 '19 at 17:52
• @hexomino If had I added 5 6 5 in the second row then how would I had filled the rest of the triangle?. – Chris Steinbeck Bell Dec 21 '19 at 3:09
• @Chris You can get the three 5's by travelling horizontally for one step, or by starting on the second row, backtracking to the first, and then heading straight down the triangle. – GentlePurpleRain Dec 21 '19 at 3:26
• @GentlePurpleRain Then how do I get account for all the ways? I can't make the same logic as used in Pascal's. How should I put those numbers?. – Chris Steinbeck Bell Dec 21 '19 at 3:29
• Chris, as I mentioned in my answer, I'm no expert in combinatorics. Perhaps @hexomino would have more insight? – GentlePurpleRain Dec 21 '19 at 6:29

If i understand the problem corectly, it seems your reasoning is that you cant go "up" in your diagram, nor can you start at the second row.

if you start with all the fives of the second row, or start with the middle 5 of row two, go up then down, that is two additional ways for each extremity of the second row, if you find other ways for the middle 5 of row 2, you might end up with blue numbers being 5-6-5, which then double for each row, and eventually en up at 256 when summed

• @GentlePurpleRain I'm trying very hard to understand what you mean by your explanation. Perhaps can you add a diagram so I could understand better?. – Chris Steinbeck Bell Dec 21 '19 at 3:08
• @Chris I'm not sure if you meant this for me, since you put it on Neil's answer, not mine... – GentlePurpleRain Dec 21 '19 at 3:20
• @GentlePurpleRain It was referring to Neil's answer. But again I'm not getting the idea of adding the extra $5$. I mean, I understand that to get the number I have to return a step behind, but if I do that I end up getting four times digit $5$ and not three as requested. – Chris Steinbeck Bell Dec 21 '19 at 3:24