# Thread: Magician Needs a Helping hand with a number sequence

1. ## Magician Needs a Helping hand with a number sequence

How we doing guys?

To cut a long story short, I'm a working magician and I'm trying to come up with a new routine that uses 3 digits (eg 123) in a 27 digit repeating loop. Sorry I don't know proper math terminology. I don't know how best to describe it so hopefully one of you guys knows what I mean but it's using the following 3 digit numbers to create a 27 digit long number that loops and repeats but without having the same 3 number sequence more than once.

111 112 113 121 122 123 131 132 133
211 212 213 221 222 223 231 232 233
311 312 313 321 322 323 331 332 333

2. ## Re: Magician Needs a Helping hand with a number sequence

I understand what you mean. I don't see a question, though. What are you looking to do with these numbers?

3. ## Re: Magician Needs a Helping hand with a number sequence

I just reread, and I think I get it. Let's go over some of the finer points. If you string together 27 digits, how many groupings of three consecutive digits are there? There are a total of 25 of these "groupings". For example, if we just had 4 digits, 1231, there are two groups of 3 consecutive digits, the first three and the second three. This is 123 and 231. If we add an extra digit, that brings us up to 3 such groups of three consecutive digits.

So, let's start anywhere. 111 should work. We will add a digit, and each time, we expect that there will not be a repeated pattern of 3 consecutive digits. We cannot add a 1, because that would give 2 sets of 3 consecutive digits of '111'. So, we can use either 2 or 3. Let's use 2.

1112

Now, we want to add another digit. We can add a 1, 2, or 3. At east step, let's add the lowest possible digit and see what happens:

11121
111211
1112113
11121131
111211311 (this will cause a problem because the next digit cannot be a 1, a 2, or a 3). So we back up one digit and use the next highest:
111211312
1112113122
11121131221
111211312212
1112113122123
...

Keep going until you reach 27 digits. I am not sure what the maximum is. But, this process will help you construct your 27 digit number. At each step, if you cannot proceed, just back up a step and use the next highest number. If that doesn't work, go back two steps. Keep going back until it works.

You can also use software to generate the sequence.

4. ## Re: Magician Needs a Helping hand with a number sequence

The question is to create a 27 digit number
Using all variations of the numbers but not more than once and have it so it loops back to itself so If I cut a pack of cards with said numbers the sequence doesn't change and I know exactly where I am.

I'm really struggling to explain it lol. I know what I want in my head just can't put it in to words lol

For example this is as close as I got.
113211122331332123232221312

So here we have 113 to begin with then if we go to the next digit we have 132 then 321 and so on?

But as you can see I have a couple of repeats 232 is there twice for example.

5. ## Re: Magician Needs a Helping hand with a number sequence

Ah I see what u mean pal. Makes sense when you write it lol. I'll give that a bash until I reach 27 hopefully gets me somewhere. Thanks a lot pal ��

6. ## Re: Magician Needs a Helping hand with a number sequence

What software is available exactly? This could come in handy lol

7. ## Re: Magician Needs a Helping hand with a number sequence

By the way, you can also start at the end at the same time and probably find a pattern more quickly. If we start with:

111211

Then we have to end the 27 digit sequence with a 3 (because when it repeats, it will pick up the first two 1's and give us 311). So, we do not want to use 311 in our sequence.

1112113122123.............3
11121131221231...........33 (this is because we have 131 and 231 already in the pattern. So, what can come before the final 3? Only another 3. Now, we also have 331.)
111211312212313..........33
1112113122123132.........33
11121131221231321........33
111211312212313213.......33
1112113122123132133......33
11121131221231321332.....33
111211312212313213322....33
1112113122123132133222...33
11121131221231321332223..33
111211312212313213322232333

And our sequence is complete.

8. ## Re: Magician Needs a Helping hand with a number sequence

To use software, I'd recommend Excel. You would need to teach yourself a little VBA coding. But, I think we just found a working sequence.

9. ## Re: Magician Needs a Helping hand with a number sequence

Yeah looks like it to me. Lifesaver pal. I have a show tomorrow and want to try this out so you have helped a bunch buddy. Shall call the effect slip eternal in your honour lol