Saturday 5 December 2020

The Juggler Sequence

Today I stumbled upon the so-called Juggler sequence explained by Wikipedia as
an integer sequence that starts with a positive integer \(a_0 \), with each subsequent term in the sequence defined by the recurrence relation:
$$a_{k+1}= \begin{cases}

\left \lfloor a_k^{\frac{1}{2}} \right \rfloor, & \mbox{if } a_k \mbox{ is even} \\

\\

\left \lfloor a_k^{\frac{3}{2}} \right \rfloor, & \mbox{if } a_k \mbox{ is odd}.

\end{cases}$$
Juggler sequences were publicised by American mathematician and author Clifford A. Pickover. The name is derived from the rising and falling nature of the sequences, like balls in the hands of a juggler. If a juggler sequence reaches 1, then all subsequent terms are equal to 1. It is conjectured that all juggler sequences eventually reach 1. This conjecture has been verified for initial terms up to one million, but has not been proved. Juggler sequences therefore present a problem that is similar to the Collatz conjecture, about which Paul ErdÅ‘s stated that "mathematics is not yet ready for such problems". 

Figure 1 shows the SageMath code (permalink) to determine the trajectory for any given number, along with the numbers of steps required and the maximum value reached.

Figure 1

Most numbers reach the value 1 quickly but others are more stubborn. Records are set as we move through the natural numbers and these numbers form OEIS sequence A094679. The sequence begins:

1, 2, 3, 9, 19, 25, 37, 77, 163, 193, 1119, 1155, 4065, 4229, 4649, 7847, 13325, 34175, 59739, 78901, 636731, 1122603, 1301535, 2263913, 5947165, 72511173, 78641579, 125121851, 198424189, ...

OEIS A094698 shows what these records are: 

0, 1, 6, 7, 9, 11, 17, 19, 43, 73, 75, 80, 88, 96, 107, 131, 166, 193, 201, 258, 263, 268, 271, 298, 335, 340, 443, 479, 484 

Comparing the two sequences we can see that there are 73 steps required for 193 to reach 1. The maximum value reached is a rather large during the trajectory is:

6743569603489758391265376070807357156339920158784377929096419715849060516985205368792190354996630779167466266586213526771780967700267133711091446786931423291036091166608223302792047793105565012490585915410391500762927066039966992101729450252321626382793545523711387059090

With such large numbers being involved, it's better to use a logarithmic scale for viewing the trajectory of a given number. For example, the trajectory of 1003 has 15 steps with maximum value 39526058. Here is its trajectory and Figure 2 gives a graphical representation: 1003, 31765, 5661392, 2379, 116035, 39526058, 6286, 79, 702, 26, 5, 11, 36, 6, 2, 1.

Figure 2: juggler trajectory of 1003

GeeksforGeeks gives the C++, C, Java, Python, C# and PHP code to generate the juggler trajectory for any natural number input.

No comments:

Post a Comment