# Name for this concept? (looping sequences)

**URL:** https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843
**Category:** Factual Questions
**Created:** [September 9, 2023, 4:19pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843 "2023-09-09T16:19:55Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![alovem](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alovem](https://boards.straightdope.com/u/alovem)
#### Post date: [September 9, 2023, 4:19pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/1 "2023-09-09T16:19:55Z")

</div>

I’m wondering if there’s a name for something I’ve noticed. I’ve defined it below in italics.

Sequences are comprised of elements. For example, 1-2-3-4 has four elements.

_If a sequence is looped such that there is one more or one less element per cycle, the number of cycles it will take to return to the first element is equal to the number of elements (the length of the sequence)._

For example, using the sequence 1-2-3-4:

Looping with one more element:

1-2-3-4-1  
2-3-4-1-2  
3-4-1-2-3  
4-1-2-3-4  
(back to 1 in four cycles)

Looping with one less element:

1-2-3  
4-1-2  
3-4-1  
2-3-4  
(back to 1 in four cycles)

The same results are obtained with sequences of five and six elements and, I’m guessing, all others.

Is there a name for this concept (defined above in italics)? Is it of any interest in mathematics or engineering?

---

<div class="post-metadata">

### Author: ![Typo\_Knig](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Typo\_Knig](https://boards.straightdope.com/u/Typo_Knig)
#### Post date: [September 9, 2023, 6:05pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/2 "2023-09-09T18:05:48Z")

</div>

Is cyclic permutation the concept you’re looking for? Wikipedia link: [Cyclic permutation - Wikipedia](https://en.wikipedia.org/wiki/Cyclic_permutation?wprov=sfti1)

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [September 9, 2023, 6:32pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/3 "2023-09-09T18:32:06Z")

</div>

I don’t know that there’s a specific name, but I’ll point out that it works for any two numbers that are relatively prime. N and N-1 are always relatively prime, so that works. But it works in other cases, too, like 3 and 5:  
12312  
31231  
23123  
12312

Sequence length 3, looping every 5, repeats after 3 cycles. But consider a case where the numbers are not relatively prime, like 4 and 6:  
123412  
341234  
123412

The cycle repeats after only two cycles since 4 and 6 are not relatively prime.

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [September 9, 2023, 8:03pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/4 "2023-09-09T20:03:41Z")

</div>

Maybe I did not understand the question exactly?

If you have a word, say _abccba_, you can consider its cyclic permutations _bccbaa, ccbaab, cbaabc, …_ Define a primitive word to be a word that is not a power of a shorter word, i.e., w=z^n implies n=1. Then a word is primitive if and only if it is distinct from all its cyclic rotations, so this seems to be the concept you are looking for.

---

<div class="post-metadata">

### Author: ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)
#### Post date: [September 10, 2023, 12:39am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/5 "2023-09-10T00:39:47Z")

</div>

I think the name for the concept might be “least common multiple” (LCM) and you’re just coming at it in a weird way.

Your examples demonstrate the the LCM of 4 and 5 is 20 and 3 and 4 is 12.

How about 4 and 6?

1-2-3-4-1-2  
3-4-1-2-3-4

Also 12.

---

<div class="post-metadata">

### Author: ![kk\_fusion](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kk_fusion/32/15276_2.png) [@kk\_fusion](https://boards.straightdope.com/u/kk_fusion)
#### Post date: [September 10, 2023, 5:30am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/6 "2023-09-10T05:30:24Z")

</div>

I’m not entirely sure what you are going for, but it sounds a lot like modular arithmetic.

Seems like you are adding elements that are congruent to 1 or -1 modulo n (in your example n = 4). Sure enough, after n iterations you are back to the start.

---

<div class="post-metadata">

### Author: ![alovem](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alovem](https://boards.straightdope.com/u/alovem)
#### Post date: [September 10, 2023, 6:16am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/7 "2023-09-10T06:16:05Z")

</div>

Thank you, Dopers, for your replies.

@Typo_Knig:  
Yes, I think what I’m looking for is an elementary part of cyclic permutation, which gets into… I’ll call it “repeating subsets of sequences.” I’m talking about something much more simple, but it seems to be closely related. I’ll give it some study and thought.

@Dr.Strangelove:  
Those examples are different from what I’m looking for. You’re looping with **two more** elements whereas I’m talking about looping with **one more** or **one less** element. Applying my idea to the sequence 1-2-3 would look like this:

Looping with one more element:  
1-2-3-1  
2-3-1-2  
3-1-2-3  
(back to 1 in three cycles)

Looping with one less element:  
1-2  
3-1  
2-3  
(back to 1 in three cycles)

@DPRK:  
You lost me there with the change from numbers to letters and words, and I’m not smart enough to understand the formula/equation you’ve provided. As I said, what I’m looking for is the name of the concept that I’ve defined in italics.

@Lance_Turbo:  
Least common multiple. That might be it, and I thought it might be something basic that I’m _just coming at in a weird way_, as you say (which is why I asked if it’s of interest). But the cycles in your post, like Dr.Strangelove’s, loop with **two more** elements, and I’m talking about looping with **one more** or **one less** element.

@kk_fusion:  
Modular arithmetic. Yeah, that clearly appears to be related to or maybe exactly what I’m talking about. I’ll look into it.

Thanks again, Dopers!

---

<div class="post-metadata">

### Author: ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)
#### Post date: [September 10, 2023, 6:21am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/8 "2023-09-10T06:21:40Z")

</div>

> [@alovem](#):
>
> But the cycles in your post, like Dr.Strangelove’s, loop with **two more** elements, and I’m talking about looping with **one more** or **one less** element.

We understand this. We are generalizing.

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [September 10, 2023, 6:22am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/9 "2023-09-10T06:22:13Z")

</div>

> [@alovem](#):
>
> Those examples are different from what I’m looking for. You’re looping with **two more** elements whereas I’m talking about looping with **one more** or **one less** element.

I understand that, but my point is that your original examples are just special cases of a more general principle. You are correct that if the loop length is one more or one less than the sequence length, then it will take a number of cycles equal to the sequence length to repeat.

But in addition to these cases, any time the two numbers are relatively prime, we can also expect the same behavior. N and N-1 are always relatively prime, so that fits. But there are other numbers as well.

But on the other hand, if the numbers are not relatively prime, then we will not hit the maximum sequence length. It will repeat after some shorter number of cycles, and miss some of the possible rotations.

---

<div class="post-metadata">

### Author: ![alovem](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alovem](https://boards.straightdope.com/u/alovem)
#### Post date: [September 10, 2023, 6:23am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/10 "2023-09-10T06:23:29Z")

</div>

Ah, okay. Thanks (ETA: thanks to both of you), I appreciate your efforts. I’ll say it again: I’m not smart enough to understand this at a higher level than simple observation. If you want to play around with the concept here, I’ll stand back and let you smart people have at it. (I say that without sarcasm.)

---

<div class="post-metadata">

### Author: ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)
#### Post date: [September 10, 2023, 6:28am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/11 "2023-09-10T06:28:09Z")

</div>

You should give yourself more credit! This is a non-obvious observation for someone not already familiar with it. Math is driven by just these sorts of explorations, as well as trying to generalize further. If you enjoyed making this discovery in the first place, you’ll probably enjoy exploring what happens with other kinds of numbers.

---

<div class="post-metadata">

### Author: ![alovem](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alovem](https://boards.straightdope.com/u/alovem)
#### Post date: [September 10, 2023, 6:35am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/12 "2023-09-10T06:35:42Z")

</div>

Thank you; you’ve very kind. I’m thrilled to see that smart people are giving it some thought!

The idea occurred to me in my childhood (not a long story but kind of weird and embarrassing), and I was later able to apply it to music. What some people call banjo rolls and other guitar techniques.

---

<div class="post-metadata">

### Author: ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)
#### Post date: [September 10, 2023, 10:51am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/13 "2023-09-10T10:51:09Z")

</div>

You might find it interesting to look at how “changes” work in bell ringing:

> **[Ringing the changes](https://plus.maths.org/content/ringing-changes)**
>
> Did you know that church bell ringers have to memorise sequences of several thousand numbers, and that it can take up to 18 hours to translate these sequences into perfect bell ringing? Burkard Polster and Marty Ross explain why, and explore the...

---

<div class="post-metadata">

### Author: ![alovem](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alovem](https://boards.straightdope.com/u/alovem)
#### Post date: [September 10, 2023, 10:56am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/14 "2023-09-10T10:56:51Z")

</div>

Definitely interesting. Thanks! 😀

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [September 10, 2023, 11:45am UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/15 "2023-09-10T11:45:58Z")

</div>

Ninjaed… I was also going to add that when ringing actual bells, there is some limitation on what permutations can be applied at any given moment. I do not know precisely what can be pulled off, but you can only slow down or speed up each bell by a maximum amount, so it would not be possible to ring 123456234561 without inserting intermediate permutations.

In general musical compositions you are not limited. Tone rows are pretty standard

> **[Tone row](https://en.wikipedia.org/wiki/Tone_row)**
>
> In music, a tone row or note row (German: Reihe or Tonreihe), also series or set, is a non-repetitive ordering of a set of pitch-classes, typically of the twelve notes in musical set theory of the chromatic scale, though both larger and smaller sets are sometimes found.
> Tone rows are the basis of Arnold Schoenberg's twelve-tone technique and most types of serial music. Tone rows were widely used in 20th-century contemporary music, like Dmitri Shostakovich's use of twelve-tone rows, "without do...

and if you are good at combinatorics and have some musical ideas then many techniques are possible.

---

<div class="post-metadata">

### Author: ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)
#### Post date: [September 10, 2023, 12:01pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/16 "2023-09-10T12:01:32Z")

</div>

> [@DPRK](#):
>
> you can only slow down or speed up each bell by a maximum amount, so it would not be possible to ring 123456234561 without inserting intermediate permutations.

I don’t follow this. A traditional bell is held upside down until the bellringer triggers it. The bell will ring once and the ringer has applied enough energy to make it rotate back to its starting position.

Timing is not a case of speeding or slowing the bell, but holding it until it is time for it to strike. It takes skill and teamwork to get it right.

---

<div class="post-metadata">

### Author: ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)
#### Post date: [September 10, 2023, 12:19pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/17 "2023-09-10T12:19:51Z")

</div>

So you are saying one _could_ ring  
`123456`  
immediately followed by  
`234561`  
by holding off bell #1? In that case bells 2, 3, 4, and 5 each ring after 5 beats but 1 must not ring until 11 places later.

---

<div class="post-metadata">

### Author: ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)
#### Post date: [September 10, 2023, 4:29pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/18 "2023-09-10T16:29:08Z")

</div>

In change ringing, each bell in a ring is numbered from 1 (the highest) to 𝑛 (the lowest). The bells sound in a sequence of rows. The movement between one row and the next is called a change.

There are two rules.

1. Each bell sounds exactly once in each row.
2. In any change, each bell can move at most one position.

There is a _Lord Peter Wimsey_ quote (W Sayers) in which he says something like: _“Foreigners might play tunes with their bells, but the English prefer mathematics.”_

There are many books and papers written about the mathematical sequences involved for different numbers of bells.

---

<div class="post-metadata">

### Author: ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)
#### Post date: [September 10, 2023, 9:44pm UTC](https://boards.straightdope.com/t/name-for-this-concept-looping-sequences/989843/19 "2023-09-10T21:44:34Z")

</div>

Also related is the concept of beat frequencies. If you have one wave at one frequency, and superimpose it with another wave at a slightly different frequency, you’ll get a wave that increases and decreases its amplitude, with a frequency equal to the difference of the two source frequencies.
