McCarthy 91 Function

The McCarthy 91 function is defined as follows:
$$
M_{91}(n) =
\begin{cases}
n – 10 & \text{if } n > 100 \\
M_{91}(M_{91}(n+11)) & \text{if } 0 \leq n \leq 100
\end{cases}
$$

We can generalize this definition by abstracting away the constants into new variables:

$$
M_{m,k,s}(n) =
\begin{cases}
n – s & \text{if } n > m \\
M_{m,k,s}(M_{m,k,s}(n+k)) & \text{if } 0 \leq n \leq m
\end{cases}
$$

This way, we have $M_{91} = M_{100,11,10}$.

Let $F_{m,k,s}$ be the set of fixed points of $M_{m,k,s}$. That is,

$$F_{m,k,s}= \left\{ n \in \mathbb{N} \, | \, M_{m,k,s}(n) = n \right\}$$

For example, the only fixed point of $M_{91}$ is $n = 91$. In other words, $F_{100,11,10}= \{91\}$.

Now, define $SF(m,k,s)$ as the sum of the elements in $F_{m,k,s}$ and let $S(p,m) = \displaystyle \sum_{1 \leq s < k \leq p}{SF(m,k,s)}$. For example, $S(10, 10) = 225$ and $S(1000, 1000)=208724467$. Find $S(10^6, 10^6)$.

This is a non-trivial number theory problem. To solve it, we’ll need to perform deep mathematical analysis and potentially exploit some properties of number theory.

Let’s first define $M(n)$ as $n$ itself when $n > m$ and $M(M(n + k))$ when $0 \leq n \leq m$, which is based on the given definition of $M_{m,k,s}(n)$. From this recursive function, we can see that all lesser numbers that we’re subtracting $s$ from will eventually be greater than $m$.

That is because, provided their initial values are within the range $0 \leq n \leq m$, each recursion will add $k$ and then subtract $s$, effectively increasing the total by $k – s$ each time until that number, plus the initial number, exceeds $m$.

Let’s consider the fixed points for a moment. A fixed point is a value of $n$ for which the result of the operation is the same value. We can find this by noting that for a number $n$ to be a fixed point, $n$ must be equal to $n + ks – s$ for some positive integer $k$, because that’s effectively what’s happening at each recursion of our $M$ function. Solving that equation for $n$, we get $n = (s / (k – 1))$.

Thus, the set of fixed points, $F_{m,k,s}$, is a set of $n$ for which $n = s / (k-1)$, where $1 < k - 1 < s$ (we exclude $k - 1 = 0$ as it will lead to division by zero). Now, $SF(m,k,s)$ is a sum of such fixed points which means we're examining the sum of all $s / (k-1)$ values for a given $s$ and $k$, $1 < k - 1 < s$ again. Therefore we sum all $s / (k-1)$ for $1 < k - 1 < s$ to find each $SF(m,k,s)$. Afterwards we calculate $S(p,m) = \displaystyle \sum_{1 \leq s < k \leq p}{SF(m,k,s)}$ by summing all $SF(m,k,s)$ for $1 \leq s < k \leq p$. However, finding $S(10^6, 10^6)$ is computationally demanding and cannot be calculated without the use of programming or a very powerful calculator. It is also not a trivial task for programming as well, since the 3-dimensional sum must be carefully optimized to avoid an unnecessary number of iterations. Finally, it is important to note that numbers of the form $10^6$ greatly increase the computational requirements, and therefore, this wouldn't be a typical question found in a usual educational environment but more likely for a computer-based math/compiler challenge. The solution to this problem therefore demands significant computational resources and programming skills. It is not within the purview of traditional math tutoring.

More Answers:
Chinese Leftovers II
Power Sets of Power Sets
Centaurs on a Chess Board

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Mathematics in Cancer Treatment

How Mathematics is Transforming Cancer Treatment Mathematics plays an increasingly vital role in the fight against cancer mesothelioma. From optimizing drug delivery systems to personalizing

Read More »