## Abstract

In this paper we study the properties of an algorithm, introduced in Browkin (Math Comput 70:1281–1292, 2000), for generating continued fractions in the field of *p*-adic numbers \(\mathbb Q_p\). First of all, we obtain an analogue of the Galois’ Theorem for classical continued fractions. Then, we investigate the length of the preperiod for periodic expansions of square roots. Finally, we prove that there exist infinitely many square roots of integers in \(\mathbb Q_p\) that have a periodic expansion with period of length 4, solving an open problem left by Browkin in (Math Comput 70:1281–1292, 2000).

### Similar content being viewed by others

Avoid common mistakes on your manuscript.

## 1 Introduction

Continued fractions are very important objects both from a theoretical and an applied point of view. First of all, they allow to characterize rational numbers and quadratic irrationals over the real numbers. Indeed, a continued fraction has a finite expansion if and only if it represents a rational number and it has a periodic expansion if and only if it represents a quadratic irrational. Moreover, they provide the best approximations of real numbers and they are used in applied fields like cryptography. Thus, it has been natural to introduce them over the field of *p*-adic numbers \(\mathbb {Q}_p\), with the aim of reproducing all the good properties of the classical continued fractions and exploiting them for deepening the knowledge of the *p*-adic numbers. Nevertheless, the definition of a good and satisfying *p*-adic continued fraction algorithm is still an open problem, since it is hard to find one interpretation that retrieves all the results that hold in the real case. There have been several attempts trying to emulate the standard definition in the field of real numbers, the most studied are due to Browkin [1, 2], Ruban [3] and Schneider [4]. The continued fractions introduced in Bedocchi [3] and [4] can have either a finite or periodic expansion when representing a rational number (see Browkin [5] and [6]). Moreover, the two algorithms are not periodic for all quadratic irrationals (the characterization of the periodicity for these two algorithms can be found, respectively, in Bundschuh [7] and Capuano et al. [8]). On the contrary, in Barbero et al. [1] Browkin defined a *p*-adic continued fraction algorithm terminating in a finite number of steps on rational numbers. However, this algorithm does not seem to be periodic on quadratic irrationals, although it is not known any example of a quadratic irrational number without periodic expansion. In fact, a full characterization for periodic continued fractions of this kind is still missing. The *p*-adic continued fraction expansion \([b_0, b_1, \ldots ]\) of \(\alpha _0\in \mathbb {Q}_p\) provided by this algorithm, which is usually called *Browkin I*, is obtained by iterating the following steps:

where \(s: \mathbb {Q}_p\rightarrow \mathbb {Q}\) is a function that replaces the role of the floor function in the classical continued fractions over \(\mathbb R\). For a *p*-adic number \(\alpha =\sum \nolimits _{n=-r}^{+\infty } a_np^n\in \mathbb {Q}_p\), with \(r\in \mathbb {Z}\) and \(a_n\in \{-\frac{p-1}{2},\ldots ,\frac{p-1}{2}\}\), the function *s* is defined as

with \(s(\alpha )=0\) for \(r<0\).

This continued fraction is very similar to the one defined in Bedocchi [3], but here the representatives are taken in \(\{-\frac{p-1}{2},\ldots ,\frac{p-1}{2}\}\) instead of the canonical ones \(\{0,\ldots , p-1 \}\). In the same paper, Browkin showed that this algorithm terminates in a finite number of steps if and only if \(\alpha \in \mathbb {Q}\). More than 20 years later, Browkin introduced in Barbero et al. [2] another *p*-adic continued fractions algorithm, using a different floor function in combination with the *s* function, with the aim of obtaining better results on the behaviour of the algorithm over quadratic irrationals. For \(\alpha =\sum \nolimits _{n=-r}^{+\infty } a_np^n\in \mathbb {Q}_p\), with \(r\in \mathbb {Z}\) and \(a_n\in \{-\frac{p-1}{2},\ldots ,\frac{p-1}{2}\}\), the new floor function is defined as

with \(t(\alpha )=0\) for \(r\le 0\).

The new algorithm proposed by Browkin, which is usually called *Browkin II*, works as follows: starting from \(\alpha _0\in \mathbb {Q}_p\) the partial quotients of the *p*-adic continued fraction are computed for \(n \ge 0\) as

Therefore, this algorithm produces the continued fraction expansion of a *p*-adic number by alternating the use of the function *s* and the function *t*, eventually adjusted with the sign function. This definition arises naturally in order to fulfill a *p*-adic convergence condition proved in [2, Lemma 1]. Indeed, the convergence of *Browkin I* is essentially due to the fact that the partial quotients have all negative *p*-adic valuation (except for the first one). In [2, Lemma 1], Browkin proved that this condition can be weakened. In particular, he proved that it is sufficient to have negative *p*-adic valuation for partial quotients with odd index and null *p*-adic valuation for partial quotients with even index. Thus, the alternating use of the functions *s* and *t* is a way to obtain a continued fraction with such partial quotients. Barbero, Cerruti and the first author [9] proved that also this second algorithm terminates in a finite number of steps on each rational number. The same authors proved in [10] that this result is still true when the algorithm is performed using the canonical representatives in \(\{0,\ldots , p-1 \}\). Moreover, in [9] and [2], it has been observed that *Browkin II* behaves better than *Browkin I* on quadratic irrationals. In particular, it appears to be periodic on more square roots and in general periods are shorter than those of the expansions produced by *Browkin I*. The periodicity properties of *Browkin I* have been well-studied (see, e.g., [10,11,12,13,14,15,16,17]), but only few things are known about *Browkin II*, due to the complexity of this algorithm that uses alternately different functions. However, the study of the periodicity of both algorithms is fundamental for understanding how to design more performing *p*-adic continued fraction algorithms. For these reasons, in this paper we are interested in studying the periodicity properties of *Browkin II* *p*-adic continued fractions.

The paper is organized as follows. In Sect. 2, we recall some useful definitions and we adapt them to *Browkin II*. In Sect. 3, we first give a necessary condition for the pure periodicity of *Browkin II*, obtaining results similar to the ones proved by Bedocchi [11] for *Browkin I*. Moreover, we prove that if \(\sqrt{D}\) exists in \(\mathbb Q_p\) and has a periodic expansion by means of *Browkin II*, then the preperiod has length either 1 or even. Finally, in Sect. 4, we prove that there exist infinitely many square roots of integers having a periodic expansion with period of length 4, answering to a problem left open by Browkin in [2]. We also explicitly provide a family of square roots having such a periodic expansion.

## 2 Preliminaries

From now on, consider *p* to be an odd prime. Let us denote by \(v_p(\cdot )\) and \(|\cdot |_p\) the *p*-adic valuation and the *p*-adic norm. Moreover, we denote by \((A_n)_{n \ge 0}\) and \((B_n)_{n \ge 0}\) the sequences obtained by the usual recurrence formulas for the convergents of a continued fraction:

so that

Note that, in this case \(A_n\) and \(B_n\) are elements of \(\mathbb Z\left[ \frac{1}{p}\right] \) for all \(n\in \mathbb {N}\).

### Example 1

Let us consider \(\alpha _0 = \frac{22}{7} \in \mathbb Q_5\). Applying *Browkin II* we obtain:

so that we have \(\frac{22}{7} = \left[ 1, -\frac{1}{5}, -1, -\frac{3}{5}, 1 \right] \). Thus, using the recurrence formulas, we have

and the sequence of convergents is:

We also define the following sets:

and

The following lemma is due to Bedocchi.

### Lemma 2

(Lemma 2.2, [11]) For all \(a,b\in J_p\), with \(a\ne b\), we have \(v_p(a-b)\le 0\).

In the following lemma we prove a similar result for the function *t* and the set \(K_p\).

### Lemma 3

Let \(\alpha =\sum \limits _{n=-r}^{+\infty }a_np^n\in \mathbb {Q}_p\), with \(r\in \mathbb {Z}\) and \(a_n\in \{-\frac{p-1}{2},\ldots ,\frac{p-1}{2} \}\) for all \(n\in \mathbb {N}\). Then

where \(|\cdot |\) is the Euclidean norm.

### Proof

If \(r\le 0\) then \(|t(\alpha )|=0<\frac{1}{2}\) and the claim holds. When \(r > 0\), then

and we have

and the thesis follows.

Now we prove the analogue of Lemma 2 for the set \(K_p\).

### Lemma 4

For all \(a,b\in K_p\), with \(a\ne b\), we have \(v_p(a-b)< 0\).

### Proof

Let us write \(a=\frac{a_0}{p^n}\) and \(b=\frac{b_0}{p^m}\), with \(v_p(a_0)=v_p(b_0)=0\). We can notice that \(n,m\ge 1\) since \(v_p(a)\) and \(v_p(b)\) are both negative. If \(n\ne m\), we may suppose \(n>m\) without loss of generality, and we get

If \(n=m\), then

Since \(|a_0-b_0|<p^n\), necessarily \(v_p(a_0-b_0)<n\), hence

and this concludes the proof.

Lemma 3 and Lemma 4 allow us to get useful results on the periodicity of *Browkin II*.

### Remark 5

In [1] it has been proved that, for *Browkin I*, the valuations of the \(A_n\)’s and \(B_n\)’s are computed as

or, equivalently,

This result is proved by induction using the fact that, for all \(n\ge 0\),

The latter condition is true also for *Browkin II*, (see [2], Lemma 1), hence Eqns. (3) and (4) also hold for *Browkin II*.

## 3 Periodicity of Browkin’s second algorithm

Bedocchi [11, 12] was able to provide some results on the periodicity of *Browkin I*. First of all, he obtained an analogue of the Galois’ Theorem for classical continued fractions, which provide a characterization of the pure periodicity by means of reduced quadratic irrational (see, e.g., [18]). Then, he focused on the length of the preperiod and the period for square roots of integers. In particular, he proved that if \(\sqrt{D}\in \mathbb {Q}_p\) has a periodic expansion by means of *Browkin I*, then the preperiod must have length two and the period can not have length one.

In this section we deepen the study of *Browkin II*. In particular, we obtain an analogue of the Galois’ Theorem and we prove that if \(\sqrt{D}\in \mathbb {Q}_p\) has a periodic expansion by means of *Browkin II*, then the preperiod must have length either 1 or even. Let us notice that, by construction of *Browkin II*, the length of the period of a continued fraction obtained by this algorithm must be even.

### Remark 6

Let us recall that, if *D* is an integer which is not a perfect square, then there exists \(\alpha \in \mathbb Q_p\) such that \(\alpha ^2 = D\) if and only if *D* is a quadratic residue modulo *p*. In this last case, there exist \(z \in \{0, \ldots \frac{p-1}{2}\}\) such that \(z^2 \equiv D \pmod p\) and \(p-z \in \{\frac{p-1}{2},\ldots ,p-1 \}\) is the other element with this property. Now, both this values can be lifted to elements in \(\mathbb Q_p\); hence we call \(\sqrt{D}\) the *p*-adic number whose expansion starts with *z* and \(-\sqrt{D}\) the other one, i.e. the one starting with \(p-z\).

### Remark 7

If a *p*-adic number \(\alpha \) has a periodic continued fraction, using a standard argument it is possible to see that it is a quadratic irrational [11, Remark 2.7.5]. It means that \(\alpha \) is the root of an irreducible polynomial of degree 2 over \(\mathbb {Q}\). We denote by \(\overline{\alpha }\), and we call it the conjugate of \(\alpha \), the second root of this polynomial, that lies inside \(\mathbb {Q}_p\).

In the following two theorems we obtain a partial result in the spirit of Galois’ Theorem also for *Browkin II*.

### Theorem 8

If \(\alpha \in \mathbb {Q}_p\) has a purely periodic continued fraction expansion \(\alpha =[\overline{b_0,\ldots ,b_{k-1}}]\) with *Browkin II*, then

### Proof

To prove the first result, we adapt the technique of [11, Proposition 3.1] for the case of *Browkin II*.

Let us notice that, by pure periodicity,

then \(|\alpha |_p=1\). If we set, for all \(n\in \mathbb {N}\),

and \(\dfrac{A_n'}{B_n'}\) are its convergents, then:

By (4),

from which we get

Since \(k-1\) is odd, then:

and, in particular, for \(n=0\), \(|\overline{\alpha }|_p=|\overline{\alpha }_0|_p<1\).

In light of Theorem 8, it is meaningful to wonder which are (and if there exist) the *p*-adic numbers satisfying the necessary condition for pure periodicity.

### Proposition 9

Let \(\alpha =a+\sqrt{D}\in \mathbb {Q}_p\), with \(a, D\in \mathbb {Z}\), *D* not a square,

Then \(|\alpha |_p=1\) and \(|\overline{\alpha }|_p<1\) if and only if \(a\equiv a_0 \mod p\).

### Proof

Let us notice that \(a_0\not \equiv 0 \mod p\) and, if \(|\alpha |_p=1\) and \(|\overline{\alpha }|_p<1\), then

it means that \(a-a_0\equiv 0 \mod p\), so \(a\equiv a_0 \mod p\).

Viceversa, if \(a\equiv a_0 \mod p\), then \(a=a_0+kp\), for some \(k\in \mathbb {Z}\). Therefore,

since \(2a_0\not \equiv 0 \mod p\), for \(p\ne 2\); moreover

Hence, in this case, \(|\alpha |_p=1\) and \(|\overline{\alpha }|_p<1.\)

The converse of Theorem 8 is not true and the best that one can prove is stated in the following theorem.

### Theorem 10

Consider \(\alpha \in \mathbb {Q}_p\) with periodic *Browkin II* expansion

If

then the preperiod length can not be odd.

### Proof

Let us notice that, by the hypothesis and the construction of *Browkin II*, the period length *k* is even and, for all \(j\in \mathbb {N}\),

Moreover,

and it follows that:

Hence, the *p*-adic absolute value of each complete quotient is, for all \(j \in \mathbb {N}\),

Since \(\alpha \) has a periodic expansion,

So we obtain:

and, analogously,

By contradiction, if the preperiod length *h* is odd, both \(h-1\) and \(h+k-1\) are even. Then \(v_p(\overline{\alpha }_{h-1})>0\) and \(v_p(\overline{\alpha }_{h+k-1})>0\), so:

By Lemma 2, we have that \(b_{h-1}=b_{h+k-1}\) and the claim is proved.

### Remark 11

In the proof of Theorem 10 we obtained that, for *h* odd, \(b_{h+k}=b_{h}\) implies \(b_{h+k-1}=b_{h-1}\). This is done by using Lemma 2 of Bedocchi for the function *s*. In the first section we proved a similar result for the second function *t*, that is Lemma 4. Lemma 4 allows us to get the implication from \(b_{h+k}=b_{h}\) to \(b_{h+k-1}=b_{h-1}\) also for *h* even, but only in the case where the odd partial quotients are obtained using the floor function *t* without the sign. In fact, in this case, if the length *h* of the preperiodic part is even, then both \(h-1\) and \(h+k-1\) are odd. This implies that \(v_p(\overline{\alpha }_{h-1})=0\) and \(v_p(\overline{\alpha }_{h+k-1})=0\). Therefore, if \(b_{h-1}=t(\alpha _{h-1})\) and \(b_{h+k-1}=t(\alpha _{h+k-1})\), then \(b_{h-1},b_{h+k-1}\in K_p\). Arguing as in the proof of Theorem 10 for *h* odd, we get

We conclude by Lemma 4 that \(b_{h-1}=b_{h+k-1}\) also when *h* is even.

The problem with *Browkin II* is that, for some odd \(n\in \mathbb {N}\),

This happens when \(\alpha _n\) has not the constant term, in order to always recover a partial quotient with null *p*-adic valuation. In the following example we see that this case can actually occur.

### Example 12

Let us consider

then the expansion of \(\alpha =\sqrt{30}+3\) is

that is not purely periodic and has preperiod 4. Notice that the 7–adic number \(\alpha \) satistfies the hypothesis of Theorem 10 since

In this case we can not make the step backward from \(b_4=b_{14}\) to \(b_3=b_{13}\) since

In fact in the generation of \(b_{13}\) it is used the sign function along with the *t* function.

In Remark 11 and Example 12, we have observed that the converse of Theorem 8 holds whenever the function *sign* does not appear during the generation of the even partial quotients \(b_h\) and \(b_{h+k}\), or whenever they use the same function *sign*. It would be interesting, then, to understand for which of the quadratic irrationals of Theorem 10 these cases always occur, in order to prove an explicit characterization of the pure periodicity of *Browkin II*.

Now we investigate the length of the preperiod of *Browkin II* expansions. In order to do that, we first introduce an algorithm that is a slight modification of *Browkin II*.

### Definition 13

(*Browkin II**) We call *Browkin II** the algorithm where the role of the functions *s* and *t* is switched. Starting from \(\alpha _0\in \mathbb {Q}_p\), with \(v_p(\alpha _0)<0\), the partial quotients of the *p*-adic continued fraction expansion are obtained for \(n \ge 0\) by

The *p*-adic convergence of any continued fraction of this kind is guaranteed. In fact, every infinite continued fraction \([b_0,b_1,b_2,\ldots ]\) can be written as \(b_0+\frac{1}{\alpha }\), where \(\alpha =[b_1,b_2,\ldots ]\in \mathbb {Q}_p\) is obtained by *Browkin II*. It is not hard to see that the observations in Remark 5 hold also for *Browkin II**, so the valuations of the convergents can be computed as in (3) and (4).

Using the same argument of Theorem 8 and Theorem 10, adapting it by switching the even and the odd steps, it is possible to prove two analogous theorems also for *Browkin II**.

### Theorem 14

If \(\alpha \in \mathbb {Q}_p\) has a purely periodic continued fraction expansion \(\alpha =[\overline{b_0,\ldots ,b_{k-1}}]\) with *Browkin II**, then

### Theorem 15

Let \(\alpha \in \mathbb {Q}_p\) with periodic *Browkin II** expansion

Then, if

the preperiod length can not be even.

### Example 16

Under these hypotheses, Theorem 15 is the best we can obtain as a converse of Theorem 14. In fact, if we consider the expansion of \(\alpha =\frac{2+\sqrt{79}}{75}\) in \(\mathbb {Q}_5\) is

that is not purely periodic and has preperiod 15. Notice that \(\alpha \) satistfies the hypothesis of Theorem 15 since starting from

then:

As consequence of the previous results, we are able to characterize the length of the preperiods for square roots of integers that have a periodic representation by means of *Browkin II*.

### Proposition 17

Let \(\sqrt{D}\) be defined in \(\mathbb {Q}_p\), with \(D\in \mathbb {Z}\) not a square; then, if \(\sqrt{D}\) has a periodic continued fraction with *Browkin II*, the preperiod has length either 1 or even.

### Proof

Notice that \(\alpha =\sqrt{D}\) can not have purely periodic continued fraction, by Theorem 8. We can then write it as

Since \(\alpha \) has a periodic continued fraction, also \(\alpha _1\) has periodic continued fraction. We are going to show that:

Notice that *i*) is satisfied since \(s(\alpha )=b_0\) and \(v_p(\alpha -b_0)>0\). Since \(\overline{\alpha }=-\sqrt{D}\), then

Now, \(v_p(\overline{\alpha }-b_0)=0\) if and only if \(b_0\ne -b_0\), that is \(2b_0\ne 0\). This is always the case for \(p\ne 2\), so, by Theorem 15, \(\alpha _1\) can not have an even preperiod length. So \(\alpha \) has either preperiod of length 1 or of even length, as wanted.

## 4 Some periodic expansions

In [2], Browkin characterized some expansions for square roots of integers provided by *Browkin II* that have period 2 and 4. Through this construction, he proved the existence of infinitely many square roots of integers with periodic expansion of period 2, similarly to what Bedocchi proved in [12] for *Browkin I*.

However, Browkin was not able to prove that the expansions having period of length 4 that he provided were infinitely many, leaving open the problem of proving the existence of infinitely many square roots of integers having a periodic *Browkin II* expansion with period of length 4. Here we prove this result by constructing, for each prime *p*, an infinite class of square roots that have a periodic *Browkin II* continued fraction with period of length 4 in \(\mathbb {Q}_p\). Similar families of continued fractions have been constructed also in [12] and [13] for *Browkin I*, with periods of length 2, 4 and 6.

### Theorem 18

Given \(D = \frac{1 - p^t}{(1-p)^2} \cdot p^2\), for any integer \(t \ge 2\), then

### Proof

In the following, we suppose \(p = 4k + 1\), the proof for the case \(p = 4k - 1\) is similar.

From [12, Eq. 2.1], it follows that

where

for a certain \(A'\in \mathbb {Q}_p\) with \(v_p(A') = 0\) and assuming *t* odd (a similar result holds for *t* even). Thus, considering \(\alpha _0 = \sqrt{D}\), we immediately get \(b_0 = s(\alpha _0) = 0\). Applying *Browkin II*, we obtain

where \(q = \frac{1-p^t}{16k^2}\), and so \(b_1 = t(\alpha _1) = \frac{1}{p}\). The next complete quotient is

Since

we have \(b_2 = s(\alpha _2) = -1\). In the next step, we have

where \(B = 1 - A + Ap\) and \(v_p(A) = v_p(B) = 0\). Now, we prove that \(\frac{1}{B} = 2 + Cp^t\) for some *C* such that \(v_p(C) = 0\). In this way, it follows that

considering that \(4k = p-1\). To prove that \(\frac{1}{B} = 2 + Cp^t\), first of all we can observe that

Using that \(1 + \frac{p-1}{2} = - \frac{p-1}{2} + p\), we obtain

Thus, we have that \(\dfrac{1}{B} = 2 + \cdots \) and we want to prove that \(v_p\left( \frac{1}{B} - 2\right) \ge t+1\). To prove this, it is sufficient to observe that

We continue to apply *Browkin II* and we get, after some calculations,

Exploiting the previous results, we have

and considering that \(\frac{-1}{1+Ap} = -1 +\ldots \), we obtain \(b_4 = -1\). For the next step, we have

from which \(b_5 = t(\alpha _5) = \frac{2}{p}\). Finally, one can check that

and the thesis follows.

### Corollary 19

Given *p* an odd prime, there exist infinitely many \(D \in \mathbb Z\) such that \(\sqrt{D} \in \mathbb Q_p\) has *Browkin II* continued fraction expansion which is periodic of period 4.

### Proof

Since *p* and \((1-p)^2\) are coprime, then there exist infinitely many integers *t* such that \(p^t \equiv 1 \pmod {(1-p)^2}\). By Theorem 18 we know that \(\sqrt{\frac{1 - p^t}{(1-p)^2}\cdot p^2}\) has a *p*-adic expansion with period 4 by means of *Browkin II* for all \(t \ge 2\) and the thesis follows.

## 5 Conclusions

In this paper we mainly analyzed the periodicity of *Browkin II* that, at the state of the art, is the closest to a standard algorithm for continued fractions over \(\mathbb {Q}_p\), in terms of its properties regarding finiteness and periodicity (as Browkin observed in [2], it appears to provide more periodic expansions for quadratic irrationals than *Browkin I*).

In Sect. 3, we found a necessary condition for the pure periodicity, that turns out to be not sufficient in general, in contrast on what Bedocchi proved for *Browkin I* in [11]. On this purpose, Theorem 10 gives conditions to obtain the pure periodicity of the expansion in most cases. The motivations for the existence of rare exceptions are underlined in Remark 11 and Example 12 and, in some sense, they implicitly characterize the pure periodicity of *Browkin II*. It would be of great interest to find a full explicit characterization for the *p*-adic numbers having a pure periodic *Browkin II* continued fraction. Regarding the preperiod, Bedocchi proved in [11] that the lengths of the preperiods of *Browkin I* expansions of square roots of integers could only be 2 or 3 and gave explicit conditions on when this happens. On this purpose, we proved that the periodic expansions for square roots of integers obtained by *Browkin II* can only have preperiod of length 1 or even. In the future, we aim to deepen the study of the preperiods for *Browkin II* algorithm, trying to give more detailed conditions to distinguish the case of each possible preperiod, in view of Proposition 17.

In Sect. 4, we obtained infinitely many square roots of integers that have a periodic expansion by means of *Browkin II* with period length 4, solving a problem left open by Browkin in [2] and generalizing what he obtained in the same paper for the period length 2. Moreover, through some experimental results, we believe that is possible to extend this result for all even period lengths. We can summarize these thoughts in the following conjecture:

### Conjecture 20

For all even \(h\in \mathbb {Z}\), there exist infinitely many \(\sqrt{D}\), \(D\in \mathbb {Z}\) not perfect square, such that *Browkin II* continued fraction of \(\sqrt{D}\) is periodic with period of length *h* [19].

## References

Browkin, J.: Continued fractions in local fields, I. Demonstr. Math.

**11**, 67–82 (1978)Browkin, J.: Continued fractions in local fields II. Math. Comput.

**70**, 1281–1292 (2000)Ruban, A.A.: Certain metric properties of the \(p\)-adic numbers. Sibirsk. Math. Z.

**11**, 222–227 (1970)Schneider, T.: Uber p-adische Kettenbruche. Symp. Math.

**4**, 181–189 (1969)Bundschuh, P.: p-adische Kettenbrüche und Irrationalität p-adischer. Elem. Math.

**32**(2), 36–40 (1977)Laohakosol, V.: A characterization of rational numbers by \(p\)-adic Ruban continued fractions. Austral. Math. Soc. Ser.

**39**(3), 300–305 (1985)Tilborghs, F.: Periodic \(p\)-adic continued fractions. Simon Stevin

**64**(3–4), 383–390 (1990)Capuano, L., Veneziano, F., Zannier, U.: An effective criterion for periodicity of l-adic continued fractions. Math. Comp.

**88**(318), 1851–1882 (2019)Barbero, S., Cerruti, U., Murru, N.: Periodic representations for quadratic irrationals in the field of \(p\)-adic numbers. Math. Comput.

**90**, 2267–2280 (2021)Barbero, S., Cerruti, U., Murru, N.: Periodic representations and approximations of \(p\)-adic numbers via continued fractions. Exp. Math. (2021). https://doi.org/10.1080/10586458.2021.2011491

Bedocchi, E.: Nota sulle frazioni continue \(p\)-adiche. Ann. Mat. Pura Appl.

**152**, 197–207 (1988)Bedocchi, E.: Remarks on Periods of \(p\)-adic continued fractions. Bollettino dell’U.M.I.

**7**, 209–214 (1989)Capuano, L., Murru, N., Terracini, L.: On periodicity of \(p\)–adic Browkin continued fractions, Preprint (2020), available at arXiv:2010.07364

Deanin, A.A.: Periodicity of \(p\)-adic continued fraction expansions. J. Number Theory

**23**, 367–387 (1986)Wang, L.: \(p\)-adic continued fractions, I. Sci. Sin. Ser. A

**28**, 1009–1017 (1985)Wang, L.: \(p\)-adic continued fractions, II. Sci. Sin. . Ser. A

**28**, 1018–1023 (1985)de Weger, B.M.M.: Periodicity of \(p\)-adic continued fractions. Elemente der Math.

**43**, 112–116 (1988)Olds, C.D.: Continued Fractions. Random House, London (1963)

de Weger, B.M.M.: Approximation lattices of \(p\)-adic numbers. J. Number Theory

**24**, 70–88 (1986)

## Acknowledgements

We would like to thank the anonymous referee for the careful reading of the paper and the many suggestions that improved the readability and quality of the paper. The first and second authors are members of GNSAGA of INdAM.

## Funding

Open access funding provided by Università degli Studi di Trento within the CRUI-CARE Agreement.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Murru, N., Romeo, G. & Santilli, G. On the periodicity of an algorithm for *p*-adic continued fractions.
*Annali di Matematica* **202**, 2971–2984 (2023). https://doi.org/10.1007/s10231-023-01347-6

Received:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s10231-023-01347-6