Some arithmetic properties of P\'olya's urn

Following Hales (2018), the evolution of P\'olya's urn may be interpreted as a walk, a P\'olya walk, on the integer lattice $\mathbb{N}^2$. We study the visibility properties of P\'olya's walk or, equivalently, the divisibility properties of the composition of the urn. In particular, we are interested in the asymptotic average time that a P\'olya walk is visible from the origin, or, alternatively, in the asymptotic proportion of draws so that the resulting composition of the urn is coprime. Via de Finetti's exchangeability theorem, P\'olya's walk appears as a mixture of standard random walks. This paper is a follow-up of Cilleruelo-Fern\'andez-Fern\'andez (2019), where similar questions were studied for standard random walks.


Introduction
In this paper we extend some results of Cilleruelo, Fernández and Fernández [3], which connect standard random walks in N 2 with the visibility of points in N 2 (or with the coprimality of pairs of positive integers), to the so called Pólya walk in N 2 .
The approach of this paper consists on expressing Pólya's walk, via de Finetti's theorem, see Theorem B, as a mixture of standard α-random walks in N 2 with α ranging in the interval (0, 1). Visibility properties of standard α-random walks were studied in [3]. A basic tool, there and now, is the second moment method, see Proposition 8. To apply this method to Pólya's walk, under the mixture representation, we need to determine the dependence upon α of the error terms of the estimates of [3] for the α-random walks, which in that paper were inmaterial.

Pólya's walk in N 2
Following Hales in [12], the Pólya walk is a discrete time stochastic process (Y n ) n!0 with values in the lattice N 2 which geometrically codifies the evolution of Pólya's urn.
The walk starts at some given deterministic initial position Y 0 = (a 0 , b 0 ) ∈ N 2 . For each n ! 0, the jump Y n+1 − Y n of the walk can take only two values, (1, 0) and (0, 1): the walk either moves one unit upwards or one unit rightwards; for each n ! 0, given the position Y n = (a n , b n ) of the walk at time n, the conditional probabilities of the only two admissible jumps are P ! Y n+1 − Y n = (1, 0) " = a n a n + b n and P ! Y n+1 − Y n = (0, 1) " = b n a n + b n · (Along this paper, probabilities, expectations and variances of random variables on diverse underlying spaces will be denoted simply by P, E and V.) The stochastic evolution of the process (Y n ) n!0 is determined solely by the starting position (a 0 , b 0 ). The random coordinates (a n , b n ) of Y n satisfy a n + b n = n + a 0 + b 0 , for each n ! 1.
The coordinates (a n , b n ) of Y n starting at (a 0 , b 0 ) register the composition of a standard Pólya urn at time n with an initial composition consisting of a 0 amber balls and b 0 blue balls: successively draw a ball uniformly at random from the urn, notice the color, return the drawn ball to the urn, and add one ball of the same color. Thus a n is the number of amber balls and b n is the number of blue balls in the urn, at time n, i.e., after n successive random drawings. Therefore, the pair (a n , b n ) registers both the position of Pólya's walk after n steps or the composition of Pólya's urn after n drawings. Along this paper, we will alternate between these two interpretations (although we will favour the first one).

Visible points
A point (x, y) in N 2 is called visible from the origin, or simply visible, if no point of N 2 other than (x, y) itself lies in the straight segment that joins (0, 0) and (x, y).
We use gcd(x, y) to denote the greatest common divisor of positive integers x and y. In divisibility terms, (x, y) ∈ N 2 is visible from (0, 0) if and only if gcd(x, y) = 1, i.e., if the integer coordinates x and y are coprime integers. It is always this characterization of visibility in terms of coprimality of coordinates that we will use in the estimates and calculations which follow.
Let V denote the set of points (x, y) ∈ N 2 which are visible from the origin. A classical theorem of Dirichlet, originally in [6], but see also Hardy-Wright [13], Section 18.3, and there, in particular, Theorem 332 (and also Sections 1.5.2, 5.2 and 5.4 in this paper), gives the density of the set V: In probabilistic terms, if N is large, the probability that two integers x and y drawn independently with uniform distribution from {1, . . . , N } is approximately 1/ζ (2).
For a natural number k ! 1, a point (x, y) ∈ N 2 is called k-visible if gcd(x, y) = k. This means that in the segment from (0, 0) to (x, y) there are exactly k points of N 2 , counting (x, y) as one of them, namely, (jx/k, jy/k), for 1 " j " k.
We denote the set of those points in N 2 which are k-visible from the origin with V k . Observe that V 1 = V and that for integer k ! 1, we have that V k = kV, in the sense that (x, y) ∈ V k if and only there exists (x ′ , y ′ ) ∈ V such that x = kx ′ and y = ky ′ .
From V k = kV it follows that the density of V k is given by Let I be the indicator function of the set V, thus I(x, y) = 1 if gcd(x, y) = 1 and I(x, y) = 0 otherwise; and for each integer k ! 1, let I k be the indicator function of V k . Observe that I 1 ≡ I.

Visits of Pólya's walk to visible points
In this paper we are mostly interested in the asymptotic proportion of time that Pólya's walk spends on the set V of visible points.
For integer N ! 1, we denote with the random variable that registers the proportion of time (or steps) up to time N (excluding Y 0 ) that Pólya's walk remains visible from the origin. It turns out that, almost surely, the sequence of random proportions Q N converges to a limit as N → ∞, and that almost surely this limit is a constant independent of the drawing of the walk; in fact, this limit is almost surely the (asymptotic) density 1/ζ(2) of the set V of visible points.
We state these facts, the main result of this paper, as follows.
Theorem 1. For any given initial position almost surely.
Irrespectively of the initial position, it is always the case that, almost surely and asymptotically, the proportion of time that Pólya's walk spends on the set V of visible points is 1/ζ(2).
In terms of Pólya's urn, Theorem 1 claims that almost surely, the proportion of drawings resulting in number of amber balls and number of blue balls which are coprime converges to 1/ζ (2).
For k-visibility, we have analogously: Theorem 2. For any given initial condition (a 0 , b 0 ) ∈ N 2 , one has that, for each k ! 1, almost surely.
Thus, almost every evolution of Pólya's walk spends for each k ! 1 an asymptotic proportion 1/(k 2 ζ(2)) of time on the set V k .
Remark 3. We would like to point out that in [12], Hales is mainly interested in two other stochastic processes: Farey's walk and Pólya's variant walk. Contrary to the Pólya walk which we are considering, these processes visit exclusively visible points, and their main appeal lies in their interesting ergodic properties.

Several balls added at each drawing; larger steps in the walk
More generally, consider the Pólya walk with initial position (a 0 , b 0 ) ∈ N 2 and with upstep and right-step of integer size c ! 1. In terms of the urn model, we start with a 0 amber balls and b 0 blue balls, and we add c amber balls (instead of just 1) if the drawn ball is amber, and c blue balls otherwise. We denote by Y c n the position at step n ! 0 of the walk with parameters (a 0 , b 0 ) and c. We have the following.
Theorem 4. For integers a 0 , b 0 ! 1 and c ! 1 and the Pólya walk (Y c n ) n!0 with up-step (0, c) and right-step (c, 0), and starting from (a 0 , b 0 ), there exists a constant ∆(a 0 , b 0 ; c, c) (explicit, and computable) such that Theorem 4 appears in Section 5 as Theorem 19 for the particular case where (a 0 , b 0 ) = (1, 1), and as Theorem 22 for the general case.
This constant ∆(a 0 , b 0 ; c, c) is given in (35). The reason of the double appearance of c in this notation is because it is a particular instance of a more general expression ∆(a 0 , b 0 ; r 0 , u 0 ), to be considered later on Section 5.4; there, a couple of explicit formulas for ∆(a 0 , b 0 ; r 0 , u 0 ) can be found. For instance, for the case (a 0 , b 0 ) = (1, 1) and u 0 = r 0 = c, the expression of ∆(1, 1; c, c) is as explicit as Here, as usual, µ stands for the Möbius function. The product above ' p ∤ c extends to all primes p which do not divide c. For c = 1, the product extends to all primes and ∆(1, 1; 1; 1) = ' p (1 − 1/p 2 ) = 1/ζ(2), as claimed in Theorem 1. But, for instance, ∆(1, 1; 2; 2) = 4
Actually, Theorem A holds for any starting position (a 0 , b 0 ) ∈ N 2 of the walk, and, moreover, almost surely and for each k ! 1, Theorem A is stated in [3] for starting point (0, 0) and mere visibility, and not, as above, for arbitrary starting point in N 2 of the walk and k-visibility. We will discuss this extension in Section 4, see Theorem 17.

Notations and some preliminaries
For a set A, we use #A to denote the cardinality of A. The symbol 1 A (x) stands for the indicator function of the set A: 1 A (x) = 1 if x ∈ A, and 1 A (x) = 0 otherwise. For a subset B of N 2 , we call the limit the electronic journal of combinatorics 30(2) (2023), #P2. 11 We use gcd(x, y) and lcm(x, y) to denote, respectively, the greatest (positive) common divisor and the least common multiple of the positive integers x and y.
As usual, µ and φ denote, respectively, the Möbius and the Euler totient functions, and ζ stands for the Riemann zeta function. With τ (n) we denote the number of divisors of n.
The symbol ' p means an infinite product which extends over all primes p, while ' p∈P means a product (maybe infinite) which extends over all primes satisfying property P. Probabilities, expectations and variances of random variables on diverse underlying spaces will be denoted simply by P, E and V. For random variables X and Y , the notation X d = Y signifies that X and Y have the same distribution: P(X ∈ B) = P(Y ∈ B), for any Borel set B in R.
With X ∼ bin(N, p), for integer N ! 1 and p ∈ (0, 1), we signify that the distribution of the random variable X is binomial with N repetitions and probability of success p. Besides, X ∼ beta(a, b) means that the distribution of the random variable X is a beta distribution with parameters a, b ∈ (0, ∞). See Section 1.5.3.
The de Finetti mixture (probability Borel) measure associated to an exchangeable sequence of Bernoulli variables is denoted by ν. See Section 2.1.
With C, C ′ , . . ., we denote some absolute constants. Let f and g be nonnegative functions. We write f (n) = O(g(n)) as n → ∞ if there exist an integer N and a constant C > 0 such that, for n > N , f (n) " C g(n). Of course, if the function g does not vanish, then we can find a constant C ′ > 0 such that f (n) " C ′ g(n) for all n. If the constant depends on some other parameter, say α, we will add subscripts and write, for instance, f (n) = O α (g(n)) as n → ∞.

Some number-theoretical results
We shall use several times the fact that gcd(a, b) = gcd(a, a + b). For the Möbius function µ, we have that and further that # The identity # where φ denotes Euler's totient function, follows by Möbius inversion from the Gauss identity n = * d|n φ(d), for n ! 1. For τ (n), the number of divisors of n, we have τ (n) = O(n δ ) for all δ > 0, as n → ∞.
See Theorem 315 in [13]. In this paper, taking δ = 1/4 will be good enough, as we just shall need an exponent less than 1/2. For k ! 1, we let g k denote the arithmetic function given by g k (n) = 1 if n is a multiple of k, and g k (n) = 0, otherwise. We let δ k be the Kronecker delta: δ k (n) = 1 if n = k, and δ k (n) = 0 otherwise.

Dirichlet's density theorem
Observe that # 1"n,m"N δ 1 (gcd(n, m)) = Writing ⌊N/d⌋ = N/d − {N/d}, and using that |µ(d)| " 1 for any d ! 1, we obtain that # 1"n,m"N In particular, using (3), we see that #{1 " n, m " N : gcd(n, m) = 1} which is Dirichlet's density result (with error estimate): the density of coprime pairs is 1/ζ(2). This is, of course, standard, but we have recalled it since we shall use later on, see Sections 5.2 and 5.4, a slightly more elaborate version of that type of argument.

Beta distributions
We shall need and use the beta distributions of probability in the interval (0, 1). Here we recall definitions, establish notations and register some simple facts. We shall denote the density of the beta(a, b) distribution with parameters a, b > 0 by f a,b (α); thus where Beta denotes the beta function: Beta(a, b) = and Γ is the gamma function.
It will relevant later on to observe that if (and only if) a > 1/2 and b > 1/2. And that if (and only if) a > 1 and b > 1.
In what follows, mostly integer values of the parameters a and b would intervene, and in that case we have that

Plan of the paper
Section 2 recalls the de Finetti exchangeability theorem and applies it to the Pólya walk. Section 3 gives a proof of the main theorem of this paper, Theorem 1, based on the mixture representation and modulo some precise estimates for α-random walks which are dealt with in Section 3.1.
Section 4 is devoted to the study of k-visibility, while Section 5 contains the analysis of Pólya walks with steps of general size and arbitrary starting point.

Exchangeability and Pólya's walk
We first describe in Section 2.1 some known facts about the de Finetti exchangeability theorem and establish some notation and terminology. Next, in Section 2.2, we apply the exchangeability theorem to Pólya's urn and walk, recalling along the way some basic properties of Pólya's urn. Finally, in Section 2.3, we exhibit Pólya's walk as a mixture of α-standard random walks.

Exchangeability and de Finetti's theorem
Let (G j ) j!1 be a sequence of Bernoulli random variables defined all of them in the same probability space.
The sequence (G j ) j!1 is said to be exchangeable if for any integer n ! 1 and any list (y 1 , . . . , y n ) extracted from {0, 1}, and for any permutation σ of {1, . . . , n}, we have that In this definition, either the random variables can be permuted, as above, or the values.
the electronic journal of combinatorics 30(2) (2023), #P2.11 The following theorem of de Finetti is the fundamental result on exchangeable sequences of Bernoulli variables.
Theorem B. Let (G j ) j!1 be an infinite exchangeable sequence of Bernoulli random variables defined in some probability space. Then we have the following.
(a) There exists a unique Borel probability measure ν on the interval (0, 1) so that, for any n ! 1 and any list (y 1 , . . . , y n ) extracted from {0, 1}, it holds that where s n = * n j=1 y j , that is, s n is the number of y j which are equal to 1. (b) The frequency limit and defines a random variable M whose law is precisely ν: (c) Conditioning upon any value θ of the limit M , the variables G j are independent and, for any n ! 1, The probability measure ν is known as the de Finetti mixture measure for the exchangeable sequence (G j ) j!1 .
Observe that from (a) of Theorem B it follows that, for n ! 1 and 0 " k " n, and, moreover, that from (c) of Theorem B it follows that Thus, conditioning on the value θ of M , (G j ) j!1 is a sequence of independent and identically distributed variables, actually, Bernoulli variables with parameter θ. Unconditionally, each variable G j is a Bernoulli variable with parameter 1 1 0 θdν(θ). Observe that statement (a) of Theorem B is in fact a characterization of exchangeability: any sequence (G j ) j!1 satisfying (a) of Theorem B is exchangeable. This is so because the probabilities P(G 1 = y 1 , . . . , G n = y n ) depend only on the sum s n = * n j=1 y j (the number of 1's among the y j ), and not on the order of the y j .

Exchangeability and Pólya's urn and walk
Next we study Pólya's urn and Pólya's walk from the perspective of exchangeability. In what follows, the urn starts with a composition of a 0 amber balls and b 0 blue balls, or the walk starts at (a 0 , b 0 ).
For each j ! 1, we let F j be the Bernoulli variable which takes the value 1 if the ball added at stage j is amber, and F j = 0 if the ball added at stage j is blue. In terms of the walk, For n ! 1, we have that * n j=1 F j = a n − a 0 for the urn, and that for the walk. For integer n ! 1 and for x 1 , . . . , x n ∈ {0, 1}, and with t n = * n j=1 x j , it follows readily from conditioning and by induction that The exchangeability of the sequence (F j ) j!1 follows from (15) since the probability in there only depends on the sum t n of the x j , and not on the order of the x j . We can rewrite (15), in terms of Beta functions, and using (9), as Or even more compactly, using the expression for the density f a 0 ,b 0 (α) in (8), as This formula (16) shows, in particular, that the de Finetti mixture measure for the exchangeable sequence (F j ) j!1 is given by The variables F j are Bernoulli variables with a common probability of success: and that this limit defines a random variable L with values in (0, 1) whose distribution is, by virtue of (16), precisely dν(α) = f a 0 ,b 0 (α) dα, i.e., the limit variable L is a beta(a 0 , b 0 ) random variable. Moreover, conditioning on a limit value α of L we have that Now, formulas (12) and (13) applied to the jumps Y n − Y 0 of Pólya's walk written as in (14) give us that, for n ! 1 and 0 " k " n, and that, for n ! 1 and 0 " k " n and α ∈ (0, 1),

Limit distribution of the slope of the walk
We consider Pólya's walk starting from an initial position , for n ! 1. Write also Y n − Y 0 , for n ! 1, in polar coordinates: Y n − Y 0 = r n (cos ψ n , sin ψ n ), with ψ n ∈ (0, π/2) and r n ! 1. Both r n and ψ n are random variables, for n ! 1.
Since 1 n * n j=1 F j tends to L almost surely, we see that (a n − a 0 )/n and (b n − b 0 )/n tend almost surely to L and 1 − L, respectively, and so and also Thus, the random angle ψ n tends, as n → ∞ almost surely to a variable Ψ given by Ψ = arctan 1−L L . Since L is a beta(a 0 , b 0 ) variable, a change of variables gives that the density function of Ψ is In terms of this variable Ψ, we have lim n→∞ r n n = 1 sin Ψ + cos Ψ almost surely, and lim n→∞ ψ n = Ψ almost surely.

Polya's walk as mixture of α-random walks
In this section, we consider the Pólya walk (Y n ) n!0 and α-random walks (Z α,n ) n!0 , all of them starting at some initial point Conditioning on L = α, the sequence (F j ) j!1 consists of independent Bernoulli variables with parameter α, and thus the distribution of Pólya's walk (Y n ) n!1 , conditioned on the limit L taking the value α ∈ (0, 1), coincides with the distribution of the α-random walk (Z α,n ) n!1 : For a fixed time n ! 1, equation (17) means, in particular, that for every k such that 0 " k " n and all α ∈ (0, 1), and that for every k such that 0 " k " n.
In the basic case when the initial position is (a 0 , b 0 ) = (1, 1), the density f 1,1 (α) is identically 1 in [0, 1] and, for each n ! 1 and 0 " k " n, Thus, in that case, the possible positions at time n of Pólya's walk starting from (1, 1) are equally likely. Recall, from (1) and (2), the random variables Q N and S α,N , which register the proportion of visible times up to time N for Pólya's walk and the α-random walk: I(Z α,n ), for α ∈ (0, 1) and N ! 1.
Equations (20) and (21) will allow us to translate appropriate estimates of the means and variances of the average time S α,N of the random walks (Z α,n ) n!0 into estimates of the mean and variance of the average time Q N of Pólya's walk (Y n ) n!0 .
Proof. As a consequence of (18), for the Pólya walk starting at (a 0 , b 0 ) we have This is so because Equation (22) gives immediately, for walks starting at (a 0 , b 0 ), that which is the first claim of the lemma. Now, for times n and n + m, where n, m ! 1, and positions 0 " k " n and 0 " q " m, one has that for all α ∈ (0, 1), and that As a consequence of (23), and analogously as the derivation of (22), we deduce that for walks starting at (a 0 , b 0 ) we have, for n, m ! 1, that This gives that and, in particular, that, for each N ! 1, The second line in this equation contains the variance of a variable H N defined in the probability space (0, 1) with probability density f a 0 ,b 0 (α) and with values H N (α) = E(S α,N ), for each α ∈ (0, 1), as claimed.
3 Asymptotic visibility of Pólya's walks: proof of Theorem 1 For the mean and variance of the average visible time S α,N of the α-random walk, we have the following estimate.
Proposition 6. For each α ∈ (0, 1), the α-random walk (Z α,n ) n!0 with any given initial position (a 0 , b 0 ) ∈ N 2 satisfies the estimates The implied constants in the big-O above depend on (a 0 , b 0 ), but not upon α ∈ (0, 1). Proposition 6 appears in [3] for the case (a 0 , b 0 ) = (0, 0) (as Propositions 3.1 and 3.2 there), except for the error terms: here, the factor N −1/4 will be enough, but we record the explicit dependence of the bounds on the probability α. For our proof of Theorem 1, this dependence in α is an essential component. Details of the proof of Proposition 6 are the content of Section 3.1. Now we translate Proposition 6 about α-random walks into a corresponding result for Pólya's walk and appeal to the second moment method (Proposition 8) towards completing the proof of Theorem 1.
For the average visible time Q N of Pólya's walk, we have the following asymptotic estimates for its mean and variance.
Proof of Corollary 7. The result for E(Q N ) follows by applying the estimate (24) of Proposition 6 to the formula (20) and integrating on α (recalling the finiteness of the integral in (10)).
Formula (21) for V(Q N ) has two terms. The first one is handled by integrating the estimate (25) of Proposition 6 with respect to α. We use here that, because a 0 , b 0 ! 2, the integral in (11) is finite.
For the second summand, V(H N ), observe first that, since the expectation minimizes the mean square deviation, one has that and then integrate with respect to α the estimate (24) of Proposition 6, using again that a 0 , b 0 ! 2.
The next proposition registers the so called second moment method (see, for instance, Section 2.3 in [7], and Lemma 2.4 in [3]).
Proposition 8. Let (W n ) n!1 be a sequence of uniformly bounded random variables in a certain probability space, and let U N be the average The remaining case of Theorem 1, that is, when a 0 = 1 or b 0 = 1, follows from observing that Pólya's walk (Y n ) n!0 starting at (a 0 , 1) has null probability of remaining always at height 1. This is so because which tends to 0 as N → ∞. In particular, for Pólya's walk starting at (1, 1), both the probability that the first n moves are upwards and the probability that the first n moves are rightwards is 1/(n + 1), for n ! 1. The walk enters the region {a ! 2, b ! 2} ⊂ N 2 with probability 1, although the average time it takes to do so is infinite. In fact, lim n→∞ a n = +∞ and lim n→∞ b n = +∞, almost surely.
This completes the proof of Theorem 1.
Remark 9. For Pólya's walk starting at (a 0 , b 0 ) = (1, 1), we can give a closed formula for E(Q N ). By appealing to equation (19), we have that where φ denotes, as usual, Euler's totient function. And thus, This last expression is easily seen to converge to 1/ζ(2) as N → ∞, by comparing it with Here we have used (5) and (4).

Estimates for α-random walks: proof of Proposition 6
The aim of this section is to prove the estimates of Proposition 6 about the α-random walks (Z α,n ) n!0 . The proof very much follows the lines of those of Propositions 3.1 and 3.2 in [3]. We first need a bound for binomial probabilities such as the following: for any α ∈ (0, 1), N ! 1 and 0 " k " N , for a certain constant C > 0. This estimate could be obtained by appealing to the local central limit theorem (see, for instance, Theorem 3.5.2 in [7]), or by combining the unimodality of the binomial probabilities with Stirling's approximation. For a precise value of C, we register the following result.
By the way, inequality (26) is not true substituting π/2 by 1. Next, we need an estimate for sums of binomial probabilities restricted to indices in a certain residue class. Lemma 11. There is an absolute constant C > 0 such that for any α ∈ (0, 1) and for integers n ! 1, d ! 1, and r ∈ Z, it holds that We may restrict r to r ∈ {0, 1, . . . , d − 1} or, for that matter, to any complete set of residues mod d, with no loss of generality.
Proof. We may assume r ∈ {0, . . . , d − 1}. If we assume further that d " n, then the proof is as that of Lemma 2.1 in [3]. To remove the assumption d " n, observe that for d > n and any r ∈ Z, there are at most two values of l in {0, . . . , n}, congruent to r mod d. (Actually, at most one such value, except in the extreme case r = 0, and d = n, where there are two.) Thus the sum of probabilities in (27) is, by (26), at most C/ , From Lemma 11, we deduce the following estimate of some further restricted binomial sums. This estimate is the key ingredient of our proof of Proposition 6 and thus of Theorem 1.
Lemma 12. Let α ∈ (0, 1). For any integers s, t ! 0, we have that, as M → ∞, The implied constant of the big-O of Lemma 12 is absolute. The proof of Lemma 12 is similar to that of Lemma 2.2 in [3]. It results from combining Lemma 11 and (7) with k = 1 and rearranging terms. We include it for completeness.
Proof. We have that Thus, as M → ∞. Lemma 11 justifies the second equality sign.
We write down now estimates for the means E ! I(Z α,n ) " and for E ! I(Z α,n )I(Z α,m ) " for the α-random walk Z α,n starting at (a 0 , b 0 ).

Lemma 13.
We have and, for n < m, as n → ∞.
The implied constants of the different big-O above do not depend upon α. The proof of Lemma 13 is essentially the same as the proof of Lemma 2.6 in [3], except that we keep the explicit dependence on α in the error terms, that the initial point (a 0 , b 0 ) has to be taken into account, and that we have simplified the big-O's using, see (6), that τ (n) = O(n 1/4 ) as n → ∞. We include it for completeness.
n l / α l (1 − α) n−l # 0"r"m−n gcd(a 0 +l+r,a 0 +b 0 +m)=1 Now, using Lemma 12 with M = m − n, s = a 0 + l and t = a 0 + b 0 + n, and so that M + t = a 0 + b 0 + m, in the inner sum, and then with M = n, s = a 0 and t = a 0 + b 0 in the first sum, combined with the estimate (6), we get Here, we have used (5), and the fact that φ(k)/k < 1. Finally, observe that the last two terms can be written together as This proves (29).
Proof of Proposition 6. Now, Proposition 6 follows from Lemma 13 with an argument much akin to that proving Propositions 3.1 and 3.2 in [3].
Proof of Theorem A. Theorem A, with no restriction on the departing point (a 0 , b 0 ), follows from Propositions 6 and 8.

Asymptotic k-visibility of random walks and Pólya's walks
For α ∈ (0, 1) and k ! 1, and a given initial position (a 0 , b 0 ), we now consider the average time S (k) α,N , up to time N , that the α-random walk (Z α,n ) n!0 is k-visible from the origin: For k ! 1, and a given initial position (a 0 , b 0 ), we consider also the average time that Pólya's walk (Y n ) n!0 is k-visible from the origin: The analysis for visibility (k = 1) which has been carried out in the previous sections may be extended to k-visibility. The key new ingredient is the following extension of Lemma 12.
Lemma 14. Let α ∈ (0, 1) and k ! 1. For any integers s, t ! 0, we have, as M → ∞, Recall, from Section 1.5.1, that g k denotes the arithmetic function given by g k (n) = 1 if n is a multiple of k, and g k (n) = 0 otherwise. The proof of Lemma 14, like that of Lemma 12, results from combining (7), now for general k ! 1, and Lemma 11.
For the proportion of k-visibility S Proposition 15. For each α ∈ (0, 1) and k ! 1, the α-random walk (Z α,n ) n!0 with any given initial position (a 0 , b 0 ) satisfies the estimates The implied constants in the big-O's above depend on (a 0 , b 0 ) and on k, but not upon α ∈ (0, 1).
Proof. We content ourselves with explaining the argument in the case when the starting point is (a 0 , b 0 ) = (1, 1) and just for the mean E(S (k) α,N ). This argument exhibits the only differences with the case k = 1.
Lemma 14 with t = s = 0 and M = n gives This expectation is non zero only if n is a multiple of k.
Let N ! 1 and let m = ⌊N/k⌋, so that mk " N < (m + 1)k. Then, with big-O's depending on k, we have where we have used (4). And thus, For the proportion of k-visibility time, Q N , of Pólya's walk we deduce, as a corollary of Proposition 15, the following.
Corollary 16. For Pólya's walk (Y n ) n!0 with any given initial position (a 0 , b 0 ) such that a 0 , b 0 ! 2 we have that, as N → ∞, The implied constants in the big-O above depend on (a 0 , b 0 ) and k.
To prove Theorem 2, we deduce, exactly as in the case k = 1, that for fixed k ! 1, , almost surely, and, thus, that almost surely, lim , for each k ! 1, which is the assertion of Theorem 2. Likewise, for α-random walks we have, as announced after Theorem A, that: Theorem 17. For any α ∈ (0, 1), the α-random walk (Z α,n ) n!0 starting at any given initial position (a 0 , b 0 ) satisfies that, for all k ! 1, almost surely.

Changing the step of the walk
We fix now an integer step c ! 1 and consider Pólya's walk (Y c n ) n!0 , starting from Y c 0 = (a 0 , b 0 ), with (a 0 , b 0 ) ∈ N 2 , when the steps of the walk are of size c. This means that for each n ! 0, the jump Y c n+1 − Y c n can take only two values, (c, 0) and (0, c): the walk either moves c units rightwards, or c units upwards. The total linear distance travelled from Y c 0 to Y c n is nc.

Exchangeability and mixtures
For each n ! 0, given the position Y c n = (a n , b n ) of the walk at time n, the conditional probabilities of the only two admissible jumps are P(Y c n+1 − Y c n = (c, 0)) = a n a n + b n and P(Y c n+1 − Y c n = (0, c)) = b n a n + b n · This walk corresponds to a Pólya's urn process where at each stage, c balls are added to the urn of the color of the observed/drawn ball. We always have at time n that a n + b n = a 0 + b 0 + nc.
As we have discussed in the case c = 1, see Section 2.2, the sequence of Bernoulli variables F c n registering whether the n-th step is rightwards, F c n = 1, or upwards, F c n = 0, is exchangeable and, in fact, if (x 1 , . . . , x n ) is a list extracted from {0, 1} and if t n = * n j=1 x j , then The de Finetti mixture measure is in this situation dν(α) = f a 0 /c,b 0 /c (α) dα, that is, a beta(a 0 /c, b 0 /c) distribution. The proportion 1 n * n j=1 F c j converges almost surely to a variable L c which follows a beta(a 0 /c, b 0 /c) distribution. Conditioning on L c = α, the sequence (F c n ) n!1 consists of independent Bernoulli variables with parameter α, and thus the distribution of Pólya's walk (Y c n ) n!1 conditioned on the limit L c taking the value α ∈ (0, 1) coincides with the distribution of the α-random walk (Z c α,n ) n!1 : For a fixed time n ! 1, equation (30) means, in particular, that for every k such that 0 " k " n and all α ∈ (0, 1), and that for every k such that 0 " k " n. In other terms, Pólya's walk (Y c n ) n!0 with steps of size c starting from the initial position (a 0 , b 0 ) is a mixture of the α-random walks (Z c α,n ) n!0 , all starting at (a 0 , b 0 ), where the mixture parameter α ∈ (0, 1) follows a beta(a 0 /c, b 0 /c) probability distribution.

An extension of Dirichlet's density result
The Pólya walk (Y c n ) n!0 starting from Y c 0 = (1, 1) may only visit the points of the grid G c of N 2 given by G c = {(1 + nc, 1 + mc) : n, m ! 0} .
The set G c ∩ V is the set of visible points which the walk (Y c n ) n!0 starting from (1, 1) can actually visit.
The density in N 2 of the intersection G c ∩ V (of visible and visitable points) is determined, as we are going to see in Proposition 18, by the quantity Observe that ∆(1) = 1/ζ(2). We may write, alternatively, From expression (32) we see that ∆(c) depends only on the prime factors of c, disregarding their multiplicity; moreover, it shows that 1 ! ∆(c) ! 1/ζ(2), as it should.
Proposition 18. For any integer c ! 1, we have that where ∆(c) is defined in (31).
The case c = 1 is Dirichlet's density result of Section 1.5.2; the proof of Proposition 18, below, follows the lines of the derivation presented in that section.

Asymptotic average visibility of Pólya's of step c
Fix c ! 1. Consider the Pólya walk (Y c n ) n!0 with steps of size c ! 1. We denote with Q c N , for integer N ! 1, the random variable and also, for integer N ! 1 and α ∈ (0, 1), we write We first consider walks (Pólya and standard) starting from the initial position (a 0 , b 0 ) = (1, 1); we shall appeal to the density result (33) of Proposition 18. We have the following asymptotic result.
Recall that ∆(1) = 1/ζ(2), as it should, in accordance with Theorem 1. Notice moreover (see the very definition (32) of ∆(c)) that, the more prime factors the step c has, the more time Pólya's walk with up and right-steps of size c remains invisible.
By the way, for the α-random walk (Z c α,n ) n!0 we also have lim N →∞ S c α,N = ∆(c) almost surely.
The proof of Theorem 19 follows the lines of the proof of Theorem 1. The main differences are listed below.
We use the following extension (and corollary) of Lemma 11.
Remark 21. For Pólya's walk Y n = ((a n , b n )) n!0 starting at (a 0 , b 0 ) = (1, 1) and with step of size c ! 2, we have P(first n steps are upwards) = P(a n = 1 + cn, b n = 1) we see that P(first n steps are upwards) ∼ % Γ(2/c) In particular, P(first n steps are upwards) tends to 0 as n → ∞. The same observations apply to the case where the first steps are rightwards.

General starting point (a 0 , b 0 )
In the general case, when the starting point (a 0 , b 0 ) of the Pólya walk (Y c n ) n!0 with up and right steps of size c is not necessarily (1,1), by appealing to the density result of Proposition 23 instead of Proposition 18 of Section 5.4, and arguing as in the case (a 0 , b 0 ) = (1, 1) above, we obtain the following.
Theorem 22. Fix integers a 0 , b 0 ! 1 and c ! 1 and consider the Pólya walk (Y n ) n!0 with up-step (0, c) and right-step (c, 0) starting from (a 0 , b 0 ). Then we have that The almost sure limit ∆(a 0 , b 0 ; c, c) is given by the expression (35) below.
Proposition 23. For integers a 0 , b 0 , r 0 , u 0 ! 1, Next we discuss an alternative expression of ∆(a 0 , b 0 ; r 0 , u 0 ) in terms of primes. Let us denote by A the set of primes that divide a 0 ; write analogously B, R and U for the sets of primes dividing b 0 , r 0 and u 0 , respectively. Finally, denote H = ((R\U )∩A)∪((U \R)∩B). Then we have that This gives in particular that so in the case of common jump c upwards and rightwards, the density is either 0 or ∆(c).
Proof of the representation (37). Since µ(d) is 0 unless d is 1 or a product of distinct primes, ∆(a 0 , b 0 ; r 0 , u 0 ) depends only of the primes that divide each of the parameters a 0 , b 0 , r 0 , u 0 , and not on their multiplicities as divisors. We may then assume that the numbers d in the sum defining ∆(a 0 , b 0 ; r 0 , u 0 ), aside from 1, are all products of distinct primes. And thus, comparing both sides of (37), we may assume that a 0 , b 0 , r 0 , u 0 are all products of distinct primes, or 1. For a set Q of prime numbers, we let Π(Q) be the set consisting of 1 and all the products of distinct primes extracted from Q. Recall that, if g is a multiplicative function, then (.) Likewise, the sets of primes R and U determine the partition of N consisting of R \ U , U \ R, R ∩ U and W = N \ (R ∪ U ).
The common refinement of these two partitions is a partition of N with 16 (pairwise disjoint) blocks, some of which could be, of course, empty.
Let D denote the subset of N given by D = {d ! 1 : d is 1 or a product of distinct primes, gcd(d, r 0 )|a 0 and gcd(d, u 0 )|b 0 }. This is the set of d's that conform the sum in (34). Fix d ∈ D. And suppose, as illustration, that a prime p belongs to R \ U . That is, p | r 0 but p ∤ u 0 . Then, in order to be a prime factor of d, we must have p | a 0 , but there is no additional restriction related to b 0 . (This argument explains blocks C 1 and C 2 in the display below.) Arguing analogously with the remaining blocks, one discovers that the prime factors of any d ∈ D must belong to the following 6 blocks of the refined partition: In fact, and conversely, any integer which is a product of distinct primes extracted from : 5 j=0 C j is in D.
Let d ∈ D be written as d = ' 5 j=0 d j , where each d j is either 1 or a product of distinct primes extracted from C j , i.e., d j ∈ Π(C j ). This factorization is unique, as the blocks are pairwise disjoint. We have then that gcd(d, r 0 ) = d 1 d 2 d 0 and gcd(d, u 0 ) = d 3 d 4 d 0 , and thus µ(d) d 2 gcd(d, r 0 ) gcd(d, u 0 ) = µ(d 0 ) · µ(d 1 ) · · · µ(d 5 ) · Therefore, using (.) and the last equality, we have that 6 Questions on more general walks (1) Unequal steps. We may consider a Pólya walk with rightwards step of size r 0 and upwards step of size u 0 , not necessarily equal, starting from a general point (a 0 , b 0 ) ∈ N 2 . We already have a general density result (see Proposition 23, and the formulas (36) or (37)) for the visible points which such a walk may visit. This general Pólya walk corresponds to a Pólya urn process where, at each stage, r 0 amber balls are added if the observed/drawn ball is amber and u 0 blue balls are added if the observed/drawn ball if blue, and where at the beginning the urn contains a 0 amber balls and b 0 blue balls.
But in this general situation the sequence of Bernoulli variables F r 0 ,u 0 n registering whether the n-th step is to the right, F r 0 ,u 0 n = 1, or up, F r 0 ,u 0 n = 0, is not exchangeable. In fact, if (x 1 , . . . , x n ) is a list extracted from {0, 1} and if t l = * l j=1 x j , for 1 " l " n, then .
If r 0 ∕ = u 0 , the probability above depends not only on t n , the number of x j which are equal to 1, but on the t l , 1 " l " n−1, and thus on the order of appearance of the 1's in the list of x j . Actually, the sequence of Bernoulli variables F r 0 ,u 0 n is exchangeable if and only if r 0 = u 0 , i.e., when the sizes of the rightwards and upwards steps coincide. This is the case of the walk (Y c n ) n!0 which we have discussed in Section 5.3. But still, with notation with obvious meaning at this time, one wonders if