On Some Properties of the Hofstadter–Mertens Function

Many mathematicians have been interested in the study of recursive sequences. Among them, a class of “chaotic” sequences are named “meta-Fibonacci sequences.” The main example of meta-Fibonacci sequence was introduced by Hofstadter, and it is called the Q -sequence. Recently, Alkan–Fox–Aybar and the author studied the pattern induced by the connection between the Q sequence and other known sequences. Here, we continue this program by studying a “Mertens’ version” of the Hofstadter sequence , deﬁned (for x > 0) by x ↦ 􏽐 n ≤ x μ ( n ) Q ( n ) , where µ ( n ) is the M¨obius function. In particular, as we shall see, this function encodes many interesting properties which relate prime numbers to


Introduction
e set of the integer sequences, denoted by Z ∞ , is in the main stream of the mathematical studies. For example, the problems associated with the set of prime numbers are central topics in mathematics and in many recent applications (including modern cryptography) are based on these sequences. Another very famous numerical sequence is the sequence of Fibonacci numbers (F n ) n ≥ 0 defined by the recurrence F n+2 � F n + F n+1 (for n ≥ 2), with initial values F 0 � 0 and F 1 � 1. e Fibonacci sequence is a binary recurrence; i.e., each term is the sum of the two preceding ones. Binary means order 2, so for an order k sequence, we need to know the previous k terms (in some combinations).
ere are classes of sequences which are not linear (like the Fibonacci sequence). For instance, the sequence (a n ) n ≥ 0 defined by the quadratic recurrence a n+1 � a 2 n + c, with a n � 0 (where c is a given complex number), is a standard example of fractal sequence (connected to Mandelbrot's set). However, besides being nonlinear, it still has order 1.
Probably the first class of recursive sequences without a fixed order, was proposed, in 1979, by Hofstadter and Gödel [1]. In fact, they defined (Q(n)) n≥1 by the self-recurrence relation as follows: Q(n) � Q(n − Q(n − 1)) + Q(n − Q(n − 2)), with initial values Q(1) � Q(2) � 1. e term "self-recurrence" is the key point here. Because we must first know the value of max Q(n − 1), Q(n − 2) { } in order to calculate the value of Q(n), the prefix "meta" means that this kind of sequence transcends, in some sense (maybe because of the nonexistence of a fixed order), the usual examples (i.e., it is "beyond" the standard recurrent sequences). e first terms of Q(n) are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6, 6, 8, 8, 8, 10, 9, 10, . . . , (2) and the graph of Q(n) in the interval [1; 1, 500, 000] is plotted in Figure 1. At first glance, the "self-definition" of Q(n) appears to be a very strange definition. Paradoxically, so far, we do not know even if Q(n) exists for all positive integers n (this is confirmed for n < 12 · 10 9 ) [2]).
Many mathematicians worked on conditional results related to the Hofstadter sequence (i.e., Q(n)) under the assumption of its well definition. For example, Golomb [3] was the first to prove that lim attention to the Q-graph. For him, these generations are the intervals [a, b] such that the partial graph } contains a complete "sausages" pattern as in Figure 1.
In 2017, Alkan et al. [5] made a very interesting discovery by studying the sequence H(n): � C(n) − Q(n)(named by them as Hofstadter chaotic heart sequence, see its "heart fractal-like structure" in Figure 2), where C(n) is the Hofstadter-Conway $10,000 sequence is defined by the following recurrence: with initial values C(1) � C(2) � 1 (in contrast with Q(n), and it was proved that this sequence is well defined on Z >0 ). Furthermore, we recall the Möbius function μ(n) which is defined by is function plays an important role in number theory and combinatorics (mainly due its unpredictable behavior).  ) if lim x⟶∞ f(x)/g(x) � 0 ). Also, we denote f ∼ g, if f(x)/g(x) tends to 1 as x ⟶ ∞(f and g are said to be asymptotically equivalent).
In the same spirit than by Alkan et al. [5], in a very recent paper, the author of [7] studied the relationship between the functions Q(n) and μ(n), by defining B(n): � Q(n) − nμ(n). In this paper, we continue this program by introducing and analyzing the accumulation function of μ(n)Q(n) which gives relations between meta-Fibonacci sequences, prime factorization, and random walks.
roughout the paper, we shall use the familiar notation

Hofstadter-Mertens Function
Here, we intend to consider the behavior of the accumulation function of μ(n)Q(n), denoted by M Q (x), which we call Hofstadter-Mertens function and it is defined as follows.

(7)
We note the apparently chaotic behavior of M Q (x) which passes through zero (i.e., M Q (x) ≤ 0 and M Q (x + 1) > 0) when x takes the following integer values:

(8)
Also, its structure seems to be chaotic and its shape seems to be as a growing "electrocardiogram" (see Figure 3). Now, we shall split our study into four points: growth, generational structure, pseudo-periodicity, and statistical viewpoint.
In all what follows, we shall suppose that Q(n) is well defined and that Q(n)/n tends to 1/2 as n ⟶ ∞. We shall quote this as "Hypothesis (H)."

Growth.
It is almost unnecessary to stress that one of the first properties to study in the direction of a better comprehension of the behavior of a "chaotic" function is its growth (for large time). In fact, the structure of such a function is strongly reflected in its growth properties. For this reason, this section will be devoted to this kind of study.
By the Hypothesis (H) (in particular, Q(n) � O(n)) together with the fact that |μ(n)| ∈ 0, 1 { }, we deduce that However, this upper bound can be sharpened with the aid of some analytic number theory facts. For example, we know that M(x) � o(x) and by Hypothesis (H), we can write Q(n) � (n/2)(1 + o (1)). is allows us to invoke a very useful formula due to Abel which makes an interplay between a discrete sum and an integral (continuous sum).

Abel's Summation Formula.
Let (a n ) n be a sequence of real numbers, and define its partial sum A(x): � n≤x a n . For a real number x > 1, let f be a continuously differentiable function on [1, x]. en, Before applying the previous formula, observe that M Q (x) can be rewritten as Note that, by the properties of Landau's symbols, ) and now, in order to obtain an estimate to n≤x nμ(n), we are in the position to apply Abel's Summation Formula with the choice of a n : � μ(n) and f(t) � t. us, By the prime number theorem, we have M(x) � o(x) and then Again, by the properties of Landau's symbols, we have and so we arrive at the following fact.

Fact 1. It holds that
We remark that since the Riemann Hypothesis (RH) is equivalent to M(x) � O(x (1/2)+ε ), then, by proceeding along the same lines as before, we deduce the following fact.
Fact 2. By assuming that the Riemann Hypothesis is true, then, for all ε > 0, it holds that Remark 1. Note that in Figure 4, the bound x (3/2) (red colored) seems to be very huge as compared to |M Q (x)|. However, we point out that a similar feeling happens by plotting a similar graphic to M(x) and x (1/2) . In fact, this leads to the "very probable" conjecture raised by Mertens: , for all x > 0. However, this conjecture was proved to be false (see [8]) for some (nonexplicit) counter examples of astronomical order about 10 10 40 .

Generational Structure.
e growth behavior of the graphical structure of M Q (n) brings a complex fractal-like structure. In fact, these kinds of patterns are commonly called "generational structure" of a meta-Fibonacci sequence (for more information about these structures for other meta-Fibonacci sequences, we refer the reader to [9][10][11]). In our case, these "generations" are the repeated "zigzag" pattern. More precisely, with Pinn's terminology, it is possible to partition the set of positive integers as Complexity where G(g) is a finite interval of natural numbers which is known as the gth generation of the sequence. In our case, each generation G(g) � [x 0 (g), x 1 (g)]will be in such a way that (see Figure 5) In an extensive empirical/heuristical study (see Figure 6), we were not able to find a pattern for x 0 (g) and x 1 (g). e main reason may lie in the chaotic behavior of μ(n) (related to random walks, for example).However, it is possible to deduce that x 1 (g) − x 0 (g) can be made arbitrarily large.
at is, we have the following fact.

Fact 3. For all positive integers N, there is an interval G(g)
with length strictly larger than N.
In the next section, we shall see that a kind of periodicity of M Q (x) is responsible for the veracity of this fact.
We point out that most of these findings are empirical observations, since virtually speaking, nothing has been proved rigorously about the Q-sequence, so far (as previously mentioned).

Pseudo-Periodicity.
A function f: R ⟶ R is said to be periodic if there exists a positive integer T such that f(x + T) � f(x), for all x ∈ R (in other words, the function repeats its values in regular intervals or periods). e most important examples of periodic functions are the trigonometric functions, which repeat over intervals of 2π radians. Periodic functions are used throughout science to describe oscillations, waves, and other phenomena that exhibit periodicity. Any function that is not periodic is called aperiodic.
Clearly, the Hofstadter-Mertens function is aperiodic. However, we can define another kind of periodicity.
Definition 2. A function f: R ⟶ R is said to be metaperiodic if for any positive integer T, there exist infinitely many positive values of x, such that f(x + T) � f(x). Let T be a positive integer, and let p 1 < p 1 < , . . . , < p T be the first T prime numbers. We have that the congruence system has infinitely many solutions in x (in a residue class modulo (p 1 p 2 , . . . , p T ) 2 ), say (n k ) k ≥ 0 , by the Chinese remainder theorem. Clearly, for a particular solution x � n 0 , we have that p 2 i | n 0 + i and so μ(n 0 + i) � 0, for all i ∈ [1, T]. us, one has μ(n 0 ) � · · · � μ(n 0 + T) � 0. In particular, we have for all k ≥ 0. us, we have the following fact.

Statistical
Viewpoint. Now, we wish to study the behavior of M Q (x) in a statistical vein. For this, our method will be based on a process that appeared in OEIS A283360 (see also its Link section) for the behavior that keeps the main characteristic of Q-sequence with deviations of noise in generations. Here, we define q(n) as the remainder after division of n k�1 M Q (k) by n. So, for n ∈ [1, 20], q(n) attains the following values: 0, 1, 2, 1, 2, 3, 6, 3, 0, 3, 0, 9, 12, 11, 5, 13, 11, 9, 15, 3. (19) Now, we define q * (n) � |q(n + 1) − q(n)| and Figure 7 is the scatter plot of M Q (n) and q * (n) for n from 1 to 10000. Figure 8 shows the evaluation (in a statistical viewpoint) of the standard deviation (SD), mean (arithmetic mean), and median of values of M Q (n) in the interval [1, m], for 2 ≤ m ≤ 5000.

Hofstadter-Mertens Function × Riemann Zeta Function
We close this study by comparing M Q (x) and the Riemann zeta function ζ(s) � n≥1 1/n s (for R(s) > 1). We know that ζ(s) converges for all R(s) > 1 and admits an analytic continuation (via Abel Summation Formula) for R(s) ≥ 1 except for a simple pole at s � 1, with residue 1 (in fact, Riemann extended this continuation for all complex planes but s � 1). e zeta function is only one example of the called Dirichlet series which, for an arithmetic function f: N ⟶ R, is defined by Many properties of prime numbers are encoded by Dirichlet's series and its Euler's product. For example, for the Riemann zeta function, we have where the product is taken over all prime numbers. We know the huge importance of primes in mathematics and even in real life (as in cryptography). So, among the attempts made in this direction, we were able to provide the following fact.
Fact 5. We have that where Here, as usual, ω(n) denotes the number of distinct prime factors of n and φ(n) � # k ∈ [1, n] : gcd(k, n) � 1 is the Euler totient function.
In order to prove this fact, we recall the Dirichlet convolution between two Dirichlet's series.
Definition 3. Let f and g be arithmetic functions; then, the Dirichlet convolution of f and g, denoted by f * g is defined by A well-known fact is that D(f, s) · D(g, s) � D(f * g, s). us, let us consider f(n) � 1 (for all n), i.e., D(f, s) � ζ(s) and then, where ψ(n) � (μ(n)Q(n) * 1)(n) � d|n μ(n)Q(n) . Since, by Hypothesis (H), Q(n)) ∼ n/2 , then ψ( where rad(n) � p|n p (where p is a prime) is called the radical of n (the proof of (26) follows from the fact that the left-hand side and the right-hand side, in formula (26), represent arithmetic multiplicative functions and so it is enough to compare them when n is a prime power). Now, we use ϕ(rad(n))/rad(n) � ϕ(n)/nto conclude Fact 5.

Conclusion
In this paper, we continue the fruitful program started by Hofstadter, Golomb, Pinn, Alkan, Fox, and Aybar (among others) to study the behavior of meta-Fibonacci sequences, mainly the Q-sequence. Here, we studied the sequence Complexity M Q (n) which is defined as the accumulation function of the product between the Q-sequence and the Möbius function (we call M Q (n) as Hofstadter-Mertens function). e sequence M Q (n) is studied with emphasis on its chaotic behavior. We split the text into four parts. We started by growing properties of M Q (n) and its relation with the Riemann hypothesis (here, we used some analytic tools). en, we present some data regarding its "generational structures" together with some other facts. In the third part, we worked on the pattern repetition of M Q (x) by showing that it satisfies a kind of "meta-periodicity." We finish by mentioning some statistical viewpoints of the Hofstadter-Mertens function, such as its mean, median, and standard deviation (in a large scale). In the final section, we still present some theories of Dirichlet series related to μ(n)Q(n) which could have some theoretical interest in detection of primes or problems related to the Riemann zeta function.
Data Availability e data calculated by the software Mathematica for Figures  1, 2, 3, 4, 6, 7, and 8 used to support the findings of this study are included within the supplementary information files.