A **Ducci sequence** (or *N-number game*) is a sequence of * n-tuples* (i.e. a list of integers). Each term in the sequence is formed by finding the absolute difference of neighboring integers [1].

## Ducci Sequence Example

**Example question**: Create a Ducci sequence for the *n*-tuple (8, 11, 2, 7).

Step 1: **Label the n-tuple’s terms a to n**:

- a = 8
- b = 11
- c = 2
- d = 7.

Step 2: **Subtract pairs of terms (a and b, b and c, c and d …). **The last term is paired with the first time, so in this example d will be subtracted from a:

- a – b = 8 – 11 = -3
- b – c = 11 – 2 = 9
- c – d = 2 – 7 = -5
- d – a = 7 – 8 = 1.

Step 3: **Place the terms from Step 2 into a new n-tuple, **ignoring the negative signs (by taking the absolute value):

(3, 9, 5, 1).

Step 4: **Connect the new n-tuples **from Step 3 with the Ducci sequence so far. We started with (8, 11, 2, 7), so:

(8, 11, 2, 7) → (3, 9, 5, 1).

Step 5: **Repeat Steps 1 to 4 **until the sequence wither reaches an n-tuple of all zeros or a periodic (repeating loop):

(8, 11, 2, 7) → (3, 9, 5, 1) → (6, 4, 4, 2) → (2, 0, 2, 4) → (2, 2, 2, 1) → (0, 0, 0, 0).

*That’s it!*

## A Graphical Ducci Sequence

The Ducci sequence can also be calculated using squares or circles, although you should start with a large enough shape (perhaps a whole sheet of paper) so that you don’t run out of room.

**Example #2:** Create a graph for the Ducci sequence (6, 9, 0, 5)

Step 1: **Draw a circle** and, starting at the top, write the sequence in a clockwise direction.

I’ve highlighted the first term of each iteration in red, so that it will be easier to reconstruct the sequence when we’ve finished.

Step 2: **Subtract pairs of terms**, starting with the red term and moving in a clockwise direction. Write down the absolute value of each difference:

Make sure to highlight the first term, which is 6 – 9 = 3 in this example.

Step 3: **Complete the sequence,** repeating Step 2 until you get all zeros or have a periodic sequence:

## References

[1] 4723 Ducci Sequence. Retrieved May 5, 2021 from: https://icpcarchive.ecs.baylor.edu/external/47/4723.pdf

**CITE THIS AS:**

**Stephanie Glen**. "Ducci Sequence" From

**CalculusHowTo.com**: Calculus for the rest of us! https://www.calculushowto.com/ducci-sequence/

**Need help with a homework or test question? **With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!