An application of results by Hardy, Ramanujan and Karamata to Ackermannian functions

The Ackermann function is a fascinating and well studied paradigm for a function which eventually dominates all primitive recursive functions. By a classical result from the theory of recursive functions it is known that the Ackermann function can be defined by an unnested or descent recursion along the segment of ordinals below ω ^ω (or equivalently along the order type of the polynomials under eventual domination). In this article we give a fine structure analysis of such a Ackermann type descent recursion in the case that the ordinals below ω ^ω are represented via a Hardy Ramanujan style coding. This paper combines number-theoretic results by Hardy and Ramanujan, Karamata's celebrated Tauberian theorem and techniques from the theory of computability in a perhaps surprising way.


Introduction
This article is part of a general investigation on the relationships between enumerative combinatorics and the theory of computability.(See, for example, Weiermann (2003Weiermann ( , 2004) ) for further related material on this topic.) In this paper we focus on classifying a Friedman-style recursion schema for the Ackermann function using "asymptotic formulae for the distribution of integers of various types" in the spirit of Hardy and Ramanujan (1916).
Then A(n) := F n (n) is a typical version of the Ackermann function.A common feature of these definitions of such a function is that the resulting function A eventually dominates every function F k and hence A is not primitive recursive (since every primitive recursive function can be computed with time bound F k for some k).We consider all such functions as equivalent and call them Ackermannian for the rest of the paper.
Ackermannanian functions grow very rapidly, since for example F 3 grows like the superexponential function.Therefore they usually do not show up in mathematical textbooks on analytic number theory.The deeper reason for this can be described briefly as follows.Usual analytic number theory can be formalized within a logical framework RCA 0 (see, for example, Simpson (1985) for a definition) which has only primitive recursive functions as provably total recursive functions by a standard result in foundations.Thus Ackermannian functions are beyond the scope of analytic number theory.
Nevertheless this observation does not exclude that one can study the behaviour of Ackermannian functions using results from analytic number theory and this will be carried out in this paper.
The link between A and the mathematics from the Hardy Ramanujan paper about asymptotic formulae is provided by the (codes for) ordinals below ω ω .Motivated by their study of highly composite numbers Hardy and Ramanujan were interested in the asymptotic behaviour of products of the form where a 1 ≥ . . .≥ a n and p i denotes the i-th prime.From the logical viewpoint it is very natural to consider such products as codes for ordinals below ω ω .Simply associate to p a 1 1 • . . .• p a n n the ordinal ω a 1 −1 + . . .+ ω a n −1 and vice versa.
To ordinals below ω ω we may associate by recursion a hierarchy of number-theoretic functions as follows.Let H 0 (n n+1) is the n-th member of the canonical fundamental sequence which converges to λ.A small calculation shows A(n) = H ω n (n) for every natural number n.Since ω n is the n-th member of the canonical fundamental sequence which converges to ω ω we obtain A(n) = H ω ω (n) in accordance to the definition above.Thus A can be defined by an unnested recursion along ω ω .(This result is a special case of a more general result by Tait about the relationship between nested and unnested recursion.) In this paper we investigate the fine structure of related recursions which lead to functions of similar growth as A. In particular we focus on a Friedman-style description of A via a descent recursion Friedman and Sheard (1995); Simpson (1985); Smith (1985).
For describing this in some more detail we need some further terminology.Let HR be the set of numbers considered by Hardy and Ramanujan.For a, b ∈ HR let a ≺ b if the ordinal associated to a is less than the ordinal associated to b.For a given binary number-theoretic function f let F f be defined as follows.
Functions like F f occur naturally in proof-theoretic investigations about provably recursive functions of formal proof systems for arithmetic Friedman and Sheard (1995).Moreover they can be used as scales for comparing hierarchies of number theoretic functions Buchholz et al. (1994).For example, the Ackermannian functions can be described in terms of suitable F f as follows.
Let 2 0 (i) Then according to a theorem of Friedman and Sheard (1995) there is a K such that A and F f K have the same growth rate in the sense that there are elementary functions (primitive recursive functions which are bounded by a fixed number of iterates of the exponential function) p and q such that A It seems quite natural to ask whether it is possible to classify those functions f for which the induced function F f has the same growth rate as A. Our main theorem runs as follows.For α ≤ ω ω let g α (n, i) (These functions grow very slowly for large α since H α grows then rather fastly.)Then F g α is primitive recursive iff α < ω ω .Moreover F g ω ω and A have the same growth rate in the sense as indicated above.
These purely foundational investigations led us naturally to questions about the asymptotic behaviour of the number of products of the form p a 1 1 • . . .• p a n n ≤ x where d ≥ a 1 ≥ . . .≥ a n and d is a fixed natural number.Such bounds are in the spirit of Hardy and Ramanujan (1916) but they do not follow from the Hardy Ramanujan style Tauberian theorem.However they can be obtained by the celebrated Tauberian theorem of Karamata.The result which is then obtained in this paper is that We believe that these number-theoretic investigations have their interest and beauty in their own and we plan to push these further.Moreover we supply these number-theoretic results with a natural application in the theory of recursive functions and we hope that number-theorists as well as logicians may find this relationship between number theory and logic attractive.

The number-theoretic part
This section of the paper deals with purely number-theoretic problems about the asymptotics of Hardy Ramanujan numbers.It can be read independently from the following section which provides the applications to Ackermannian functions.
As indicated before, let p i denote the i-th prime number.Let be the set of integers which has been investigated by Hardy and Ramanujan.For a, b ∈ HR let a ≺ b be defined as follows.Assume or there is an i ≤ min{m, n} such that a i < b i and a j = b j for 1 ≤ j < i.This ordering is quite natural since it is the order type of the polynomials under eventual domination.Indeed, for a as x → ∞.
In this section we are going to show that hr d (x) ∼ 1 (d!) 2 ( ln(x) ln(ln(x)) ) d as x → ∞ and we draw an easy corollary that is needed in the desired application.
Following Hardy and Ramanujan it is convenient to define Proof.It suffices to show This is more or less obvious by grouping the factors appropriately together.(In some sense this is similar when one counts partitions and their conjugates.In terms of block diagrams this simply means that we are counting blocks at one time via columns and at the other time via rows.)Nevertheless we give some more formal details for the readers convenience." ⊆ ".Assume a ∈ HR, a ≤ x and a ≺ p d+1 1 .Then

Theorem 2 (Hardy and Ramanujan
The induction hypothesis and Theorem 2 yield L(s) ∼ 1 ) d−1 as s → 0 + .We have for Theorem 3 (Karamata's Tauberian Theorem, Bingham et al. ( 1987)) Let U be a non decreasing right continuous function on the real numbers with U(x) = 0 for all x < 0.
As a nice application we obtain the following result.
Then ∑ n≤x a n = hr d (x).Let U(x) = ∑ ln(n)≤x a n .Then, as s → 0 + , ) and the result follows. ✷ With |i| we denote the binary length of i which is the number of digits when we write i with respect to base 2. Moreover let ⌊x⌋ be the least integer less than or equal to x.The following corollary is needed in the desired applications in the next section.Informally speaking it says that the major part of the number of prime number products under consideration is not seriously diminished when square root of log sized initial parts are not taken into account.
Theorem 4 yields the existence of a constants By the standard bounds on the number of ordered sequences of a fixed lengths (where repetitions are allowed) we obtain Every product a = p a 1 1 • . . .• p a r r ∈ X(n, i) yields by splitting up a unique product p a 1 1 • . . .• p a r k(n,i) ∈ Y (n, i) and an empty product if r ≤ k(n, i) and a unique product would hold for unboundedly many i then we would have #X(n, i) ≤ (n + 3) k (n,i) • 2 |i| for unboundedly many i.This contradicts (1).Thus the existence of K(n) follows.✷ In the next section we need some elementary result on the number of prime factors of elements of HR.Thus, following Hardy's notation, let Ω(a) for a ∈ HR denote the number of prime factors in a counted with multiplicities.
The proof requires only simple estimates on the function j → p j which may be found for example in Apostol (1976).

The classification result for Ackermannian functions
We call a primitive recursive function f : For any g : According to a general result of Friedman and Sheard (1995) there exists an elementary function g : since the coding of ω ω via HR is elementary.A closer inspection of the coding of the fundamental sequences for ω ω yields that In this section we are going to classify as good as seems possible the functions g for which H ω ω (n) ≤ F g (n) holds.For that purpose we use a result about special descent recursions where bounds on Ω are put.
For a function g : Then according to an unpublished result due to Friedman for q(n, i) = n + i there is a unary elementary function p(n) such that H ω ω (n) ≤ G q (p(n)) for every n.
By elementary bounds on the function j → p j (see, for example, Apostol (1976)), we obtain a constant D such that l j ≤ exp(D j ln( j)) for all j.Thus for K(n) ≤ i ≤ K we obtain using Lemma 3 for some suitable elementary function t ′ .Note that k(n, |i|) disappears in the calculation since for large i we have k(n, |i|) 2 ≤ (n + 1 + |i|) 2 which is (for large i) much smaller than n+1 √ 2 |i| .This yields the claim.✷ The following shows that our bound is sharp.g(n, i)]]}.Then F g α is primitive recursive for all α < ω ω .
The proof is left as an exercise and can be extracted from Arai (2002) or Weiermann (2003) using Theorem 4.
Remarks: At first sight it seems that Theorems 6 and 7 are very special since they rely on the specific representation of the Hardy Ramanujan numbers, i.e. the specific coding of the ordinals below ω ω .It turns out that they hold in much more general situations since the bounds from the Hardy Ramanujan, i.e.Theorem 2, can be extended cum grano salis to more general contexts.For example, if f : N → N is linear, i.e. f (x) = k • x for some fixed k ∈ N and if we consider then Theorems 6 and 7 hold also with respect to HR f .Moreover we believe that it will be not too hard to show that Theorems 6 and 7 hold also with respect to HR f if f : N → N is a strictly increasing polynomial function.Moreover it seems plausible that it is possible to replace the data structure of primes by a suitable system of Beurling primes.
In this paper we have confined ourselves for the sake of simplicity of presentation with one of the most simplest choices of the coding.The coding seems to be a very natural one and it is in complete accordance with the choice proposed by Hardy and Ramanujan.
eventually dominated by f b .Readers familiar with ordinals will recognize that the order type of ≺ is ω ω .Let hr(x) := #{a ∈ HR : a ≤ x} and let hr d (x) := #{a ∈ HR : a ≤ x & a ≺ p d+1 1 }.In their paper Hardy and Ramanujan showed the following beautiful result.Theorem 1 (Hardy and Ramanujan (1916)) the number of factors is equal to a 1 =: e ≤ d. " ⊇ ".Let l = l i 1 • . . .• l i e where i 1 ≤ . . .≤ i e .By grouping equal factors together we obtain a representation l = l a 1 j 1 • . . .• l a d j d where j 1 < . . .< j d and a 1 + . . .+ a d ≤ e and a j ≥ 1.Then