# On The Square Root of Natural Numbers and Their Tabular Representation

Anuj Bhatnagar

► To cite this version:

Anuj Bhatnagar. On The Square Root of Natural Numbers and Their Tabular Representation. 2025. [hal-05190358v2](https://hal.science/hal-05190358v2)

HAL Id: hal-05190358

https://hal.science/hal-05190358v2

Preprint submitted on 13 Aug 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# On The Square Root of Natural Numbers and Their Tabular Representation

Anuj Bhatnagar

Society for Applied Microwave Electronics Engineering and Research (SAMEER),

IIT Campus, Powai, Mumbai-400076. India.

anuj@sameer.gov.in

## Abstract

A novel formulation based on continued fractions is presented for the precise computation of square roots of natural numbers. This approach enables, for any given value of *n*, the direct construction of its continued fraction representation without iterative estimation. The method unveils a strikingly regular and elegant infinite ladder-like structure, within which the square roots of natural numbers are systematically organized. By capturing the inherent periodicity and symmetry of these expansions, the formulation not only enhances computational efficiency but also offers deep theoretical insights into the nature of irrational numbers and their continued fraction behaviour.
Introduction

The problem of finding the square root of a natural number has captivated mathematicians, scientists, and engineers for millennia. It represents a unique intersection between elementary arithmetic and advanced numerical analysis, embodying both simplicity of statement and complexity of execution. While a small subset of natural numbers, perfect squares, yield whole number roots, the vast majority result in irrational values that cannot be represented as finite decimals or simple fractions. This fundamental fact, recognized as early as classical antiquity, precludes the existence of a universal, closed-form expression for square roots of arbitrary natural numbers. Consequently, approximating the square root of a number has evolved into a multifaceted challenge, inviting the development of a wide spectrum of computational techniques, ranging from manual algorithms rooted in ancient traditions to sophisticated hardware-level implementations in modern digital systems (Burden & Faires, 2011; Sant'Anna & Sant'Anna, 1999).

Among the most straightforward and historically important techniques is prime factorization, which involves decomposing a number into its basic prime elements. However, it becomes impractical for larger numbers or for non-square inputs. The prime factorization is a computationally intensive problem with no efficient solution for large values, an issue that also underpins the security of modern cryptographic systems (Cormen et al., 2009; Koblitz, 1994). This method sees limited use in high-precision or large-scale computational contexts.

The long division technique is a hands-on process that resembles conventional long division steps. By pairing digits and proceeding step by step through a digit-by-digit estimation process, one can derive an increasingly accurate approximation of a square root without advanced tools. Though capable of high precision and entirely mechanical in nature, the long division method is cumbersome and time-consuming, particularly for large numbers or when many decimal places are required. It has limited practical use, but retains value in education as a means of illustrating algorithmic thought and historical computational practice (Rosen, 2012).

By contrast, the iterative averaging method—often traced back to the ancient Babylonians and later formalized by Greek mathematicians like Hero of Alexandria, remains one of the most enduring and widely used techniques for finding square roots (Heath, 1921; Sant'Anna & Sant'Anna, 1999). This approach starts with an initial guess value and iteratively brings the result closer to the true square root, and convergence is typically rapid. Modern numerical analysis confirms that this method, also known as Heron's or the Babylonian method, exhibits quadratic convergence under typical conditions, making it highly efficient even when implemented in software or hardware (Burden & Faires, 2011). Its continued use in contemporary numerical libraries attests to its computational robustness and elegant simplicity.

Originating from calculus, the Newton-Raphson method extends the idea of iterative approximation. When used to find square roots, it closely resembles the Babylonian technique, though it's part of a more general approach to solving nonlinear equations. Its theoretical foundation in differential calculus enables broad applicability across scientific computation, yet in the square root case, it converges identically to the ancient averaging approach. Despite its ancient roots, the Newton-Raphson method is now fundamental to modern numerical computing, valued for its efficiency and versatility, and underpins numerous high-performance mathematical algorithms. (Atkinson, 1989; Press et al., 2007).
A distinct methodological category arises in the form of binary search, or interval halving. In this approach, the square root is located by repeatedly narrowing down an interval in which it must lie, using comparisons between squared midpoints and the target number. Though convergence is slower—typically linear rather than quadratic—this method has significant advantages in contexts where only basic arithmetic operations are available. Binary search is particularly suitable for implementation in embedded systems or environments lacking division and floating-point capabilities, as it relies solely on multiplication and conditional logic. Its predictability and simplicity have led to its adoption in low-level numerical libraries and constrained hardware environments (Cormen et al., 2009; Weiss, 2012).

At an even lower level, the bitwise method constructs square roots one binary digit at a time, exploiting the binary representation of numbers to test and set individual bits in the result. By using bit shifting, subtraction, and comparison, the algorithm can incrementally build the integer square root without needing multiplication or division operations. Although less known outside of computer architecture, the bitwise method is highly efficient in hardware and firmware applications, especially in microcontrollers and digital signal processors where resources are limited (Knuth, 1997; Thoen & Sarpeshkar, 2005). Its deterministic behaviour and fixed resource requirements make it a valuable tool in embedded system design.

An alternative family of methods takes a more analytical route by leveraging logarithmic identities. The logarithmic method calculates the square root of a number by first computing its logarithm, halving the result, and then taking the antilogarithm. While this approach is not well suited to manual calculation or low-level hardware, it is elegant and efficient in high-level computing environments with access to accurate logarithmic and exponential functions. Its usefulness is especially pronounced in scientific computing, spreadsheets, and environments where such functions are already optimized and readily available. Nevertheless, the accuracy of this method hinges on the precision of the log and exp implementations, which may vary across platforms (Press et al., 2007).

Modern computational platforms typically do not rely on a single method but instead implement hybrid approaches. In many numerical libraries and hardware instruction sets, square root operations begin with an approximate estimate—often derived from a lookup table, hardware instruction, or fast initial algorithm—and then apply a few iterations of a converging method such as Newton-Raphson to refine the result. This layered approach balances speed, precision, and resource usage, especially important in environments where performance and numerical stability are critical. For instance, floating-point units (FPUs) in modern CPUs often implement square root operations using dedicated hardware pipelines that blend fast approximation with correction stages, delivering results accurate to within machine precision in a single or a few clock cycles (Intel, 2020; IEEE Std 754-2019).

The evolution of square root algorithms offers a compelling case study in the adaptation of mathematical problems to changing technological contexts. From clay tablets to silicon chips, the same underlying challenge, approximating an irrational number to a high degree of accuracy, has inspired methods that reflect not only the mathematical tools of their time but also the physical and computational constraints in which they were developed. Early civilizations, limited by human computation, favoured methods based on repetitive structure and geometric insight. The development of calculus enabled more powerful analytical tools. The advent of digital computing introduced binary logic, finite precision, and the need for real-time computation, prompting the creation of methods optimized for specific architectures and instruction sets.
Today, the extraction of a square root may appear trivial, handled invisibly by calculators, software libraries, or hardware circuits. Yet behind each of these implementations lies a legacy of mathematical exploration and algorithmic refinement. Understanding the diversity of these methods, and the trade-offs they involve, offers not only historical perspective but also practical insight into numerical computation. It highlights the enduring challenge of approximating non-algebraic values, the ingenuity required to overcome it, and the continuing relevance of classical mathematics in the digital age.

## Continued Fractions and the Kettenbruch Representation of Real Numbers

Continued fractions called Kettenbrüche in German, provide a robust and elegant method for expressing real numbers. They have been central to number theory, approximation theory, and even symbolic computation, thanks to their compact form, precision in approximation, and historical significance in classical mathematics.

A basic continued fraction (CF) can be written in the following form (Olds, C. D. (1963)):

$$x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + \dots}}}$$

or

$$x = [a_0; a_1, a_2, a_3, \dots]$$

where $a_0$ is an integer, $a_i$ for $i \ge 1$ is a positive integer, rational number has a finite continued fraction expansion and every irrational number yields a unique infinite expansion (Hardy, G. H., & Wright, E. M. 1979). Continued fractions of irrational numbers typically display intricate but informative patterns that relate to their algebraic properties (Olds, 1963; Rockett, A. M., & Szüsz, P. 1992).

One of the most celebrated contributions to the theory of CF came from Carl Friedrich Gauss, who generalized the traditional form into what is now known as the Gauss-Kettenbruch or general continued fraction. It is expressed as:

$$x = b_0 + K_{i=1}^{\infty} \frac{a_i}{b_i}$$

Where "K" stands for Kettenbruch (or CF).

$$x = b_0 + \frac{a_1}{b_1 + \frac{a_2}{b_2 + \frac{a_3}{b_3 + \dots}}}$$

In this formulation, the coefficients $a_i$ and $b_i$ need not be integers and can follow specific algebraic or functional forms. Gauss employed these generalized Kettenbrüche in his studies of elliptic integrals, special functions, and transcendental constants, demonstrating their utility beyond pure number theory (Wall, 1948; Pólya & Szegő, 1972).

The rational numbers obtained by truncating the continued fraction at successive stage, offer the best possible approximations to irrational numbers, minimizing the error relative to the
size of the denominator. This optimality is unmatched by decimal truncation and is
foundational to algorithms in cryptography, symbolic computation, and numerical analysis
(Hardy & Wright, 1979).

Moreover, the periodic nature of CF for quadratic irrationals, as proven by Lagrange and
expanded by Gauss, provides a striking characterization: any real number whose continued
fraction eventually repeats is a quadratic equation solution with rational coefficients. This not
only connects CF to classical algebra but also enables elegant solutions to equations like
Pell's equation.

In modern applications, continued fractions serve roles ranging from high-precision
computing and irrationality testing to signal processing and compressive coding. Their
convergence properties and compact structure make them indispensable in fields requiring
accurate real number approximations with controlled computational resources.

In essence, the *Kettenbrüche* representation is more than a notational curiosity, it is a bridge between number theory, analysis, and computation, linking ancient algorithms with modern mathematical innovation.

## Continued Fractions and the Square Roots of Natural Numbers

Continued fractions play a powerful role in representing irrational numbers, particularly
square roots of natural numbers that are not perfect squares. Unlike decimal expansions,
which may be non-repeating and difficult to analyze, continued fractions provide structured,
often periodic representations that reveal important algebraic properties and enable highly
accurate approximations. While they do not provide a simple closed-form expression for
square roots, continued fractions yield sequences of rational approximations, called
convergents, that converge remarkably efficiently to the true value of a square root.

One of the most remarkable properties of square roots of non-square natural numbers is that their simple continued fraction expansions are eventually periodic. In 1770, Joseph-Louis Lagrange provided a formal proof of this result, which later became known as Lagrange's Theorem. This periodicity is unique to square roots of non-square integers and provides a valuable tool for identifying and analyzing these numbers. For example, the continued fraction for $\sqrt{13}$ is:

$\sqrt{13} = [3; 1, 1, 1, 1, 6]$, where the sequence 1, 1, 1, 1, 6 repeats indefinitely.

Irrational square roots of natural numbers are all periodic. The periodicity also hints at deeper
algebraic connections: the length of the period is tied to the fundamental solution of Pell's
equation, a classical Diophantine equation in number theory (Niven, I., Zuckerman, H. S., &
Montgomery, H. L., 1991).

The rational approximations are derived by truncating continued fraction at different stages. These convergents are among the best possible rational approximations to irrational numbers (Khinchin, A. Ya., 1997). For square roots, this means they provide extremely close approximations with relatively small denominators. For instance, in the case of $\sqrt{2} = [1; 2, 2, 2, ...]$, the convergents are 1, 3/2, 7/5, 17/12, and so on. Each successive convergent is closer
to the actual value of $\sqrt{2}$ than any other fraction with a smaller or equal denominator, making this method ideal for applications where precision and efficiency are both required.

A recursive algorithm that relies on integer calculations is used to determine the periodic continued fraction of $\sqrt{n}$. At each step, one calculates a remainder, a new denominator, and the next coefficient in the sequence. This structured method enables the construction of convergents to any desired degree of accuracy, without the need for floating-point arithmetic or iterative root-finding techniques.

In modern computation, while square roots are typically calculated using built-in numerical routines or iterative methods like Newton-Raphson, the continued fraction approach remains relevant in areas that require symbolic reasoning or exact arithmetic. Software systems like Mathematica, Maple, and SageMath use continued fraction expansions in algorithms for rational approximation, algebraic number manipulation, and simplification of radicals. In cryptography, continued fractions are used in attacks against improperly configured RSA keys, where approximations of the private exponent are recovered using convergents (Boneh&Durfee, 1999).

Importantly, the continued fraction method has educational value as well. It demonstrates the convergence of rational sequences to irrational limits, offering an accessible yet rigorous example of numerical approximation (Jones, W. B., &Thron, W. J., 1980). It also provides a concrete application of recursive algorithms and number theory, making it a valuable tool in both pedagogy and research.

Although continued fractions do not provide a straightforward formula for calculating the square root of a natural number, they offer a periodic and well-organized representation that yields highly efficient rational approximations (Rockett&Szüsz, 1992). The method connects deep areas of mathematics—from classical number theory and algebraic equations to modern computational applications—and highlights the continued relevance of historical mathematical tools in contemporary contexts.

## Observation of a Tabular Pattern in Square Roots of Natural Numbers

A novel tabular pattern has been observed in the continued fraction representation of $\sqrt{n}$, where n is a natural number. The pattern reveals a simple formulation for calculating $\sqrt{n}$. The detailed calculations and related observations are presented below:

for $n = 1$ to $\infty$. We can write

or

$$n = b_0^2 + a_1$$

$$a_1 = n - b_0^2$$

Where $a_1$ is the remainder after subtracting the largest perfect square $b_0^2$ from $n$

$$b_1 = 2 \cdot b_0$$

We now make use of the continued fraction for a real number $x$, defined earlier, but as a special case where $a_1 = a_2 = a_3 = \dots$ and $b_1 = b_2 = b_3 = \dots$
$$x = b_0 + \frac{a_1}{b_1 + \frac{a_1}{b_1 + \frac{a_1}{b_1 + \ddots}}}$$

or

$$x = b_0 + \frac{a_1}{2b_0 + \frac{a_1}{2b_0 + \frac{a_1}{2b_0 + \dots}}}$$

This equation will be used in our subsequent calculations. We can also split the real number in two parts, the natural number $b_0$ and the decimal part $d_0$

$$x = b_0 + d_0$$

We can now write down the CF for decimal part of $x$ for $n$ varying from 1 to 25. The steps involved here are

1. Enter the value of $n$

2. Determine $b_0$, $b_1$, and $a_1$ as explained above

3. Write the CF expression for $x$

<table><caption>Table-1: Parameters for continued fraction calculation</caption><thead><tr><th>n</th><th>b0</th><th>a1</th><th>b1</th></tr></thead><tbody><tr><td>1</td><td>1</td><td>0</td><td>2</td></tr><tr><td>2</td><td>1</td><td>1</td><td>2</td></tr><tr><td>3</td><td>1</td><td>2</td><td>2</td></tr><tr><td>4</td><td>2</td><td>0</td><td>4</td></tr><tr><td>5</td><td>2</td><td>1</td><td>4</td></tr><tr><td>6</td><td>2</td><td>2</td><td>4</td></tr><tr><td>7</td><td>2</td><td>3</td><td>4</td></tr><tr><td>8</td><td>2</td><td>4</td><td>4</td></tr><tr><td>9</td><td>3</td><td>0</td><td>6</td></tr><tr><td>10</td><td>3</td><td>1</td><td>6</td></tr><tr><td>11</td><td>3</td><td>2</td><td>6</td></tr><tr><td>12</td><td>3</td><td>3</td><td>6</td></tr><tr><td>13</td><td>3</td><td>4</td><td>6</td></tr><tr><td>14</td><td>3</td><td>5</td><td>6</td></tr><tr><td>15</td><td>3</td><td>6</td><td>6</td></tr><tr><td>16</td><td>4</td><td>0</td><td>8</td></tr><tr><td>17</td><td>4</td><td>1</td><td>8</td></tr><tr><td>18</td><td>4</td><td>2</td><td>8</td></tr><tr><td>19</td><td>4</td><td>3</td><td>8</td></tr><tr><td>20</td><td>4</td><td>4</td><td>8</td></tr><tr><td>21</td><td>4</td><td>5</td><td>8</td></tr><tr><td>22</td><td>4</td><td>6</td><td>8</td></tr><tr><td>23</td><td>4</td><td>7</td><td>8</td></tr><tr><td>24</td><td>4</td><td>8</td><td>8</td></tr><tr><td>25</td><td>5</td><td>0</td><td>10</td></tr></tbody></table>

The perfect squares like 1, 4, 9, 16 and 25 have $a_1 = 0$, which means no decimal term in their square roots. The CF representation for the tabled numbers $x(n)$ is shown below.
$$x(2) = 1 + \frac{1}{2 + \frac{1}{2 + \frac{1}{2 + \dots}}}$$

$$x(5) = 2 + \frac{1}{4 + \frac{1}{4 + \frac{1}{4 + \dots}}}$$

$$x(7) = 2 + \frac{3}{4 + \frac{3}{4 + \frac{3}{4 + \dots}}}$$

$$x(10) = 3 + \frac{1}{6 + \frac{1}{6 + \frac{1}{6 + \dots}}}$$

$$x(12) = 3 + \frac{3}{6 + \frac{3}{6 + \frac{3}{6 + \dots}}}$$

$$x(14) = 3 + \frac{5}{6 + \frac{5}{6 + \frac{5}{6 + \dots}}}$$

$$x(17) = 4 + \frac{1}{8 + \frac{1}{8 + \frac{1}{8 + \dots}}}$$

$$x(19) = 4 + \frac{3}{8 + \frac{3}{8 + \frac{3}{8 + \dots}}}$$

$$x(21) = 4 + \frac{5}{8 + \frac{5}{8 + \frac{5}{8 + \dots}}}$$

$$x(23) = 4 + \frac{7}{8 + \frac{7}{8 + \frac{7}{8 + \dots}}}$$

$$x(3) = 1 + \frac{2}{2 + \frac{2}{2 + \frac{2}{2 + \dots}}}$$

$$x(6) = 2 + \frac{2}{4 + \frac{2}{4 + \frac{2}{4 + \dots}}}$$

$$x(8) = 2 + \frac{4}{4 + \frac{4}{4 + \frac{4}{4 + \dots}}}$$

$$x(11) = 3 + \frac{2}{6 + \frac{2}{6 + \frac{2}{6 + \dots}}}$$

$$x(13) = 3 + \frac{4}{6 + \frac{4}{6 + \frac{4}{6 + \dots}}}$$

$$x(15) = 3 + \frac{6}{6 + \frac{6}{6 + \frac{6}{6 + \dots}}}$$

$$x(18) = 4 + \frac{2}{8 + \frac{2}{8 + \frac{2}{8 + \dots}}}$$

$$x(20) = 4 + \frac{4}{8 + \frac{4}{8 + \frac{4}{8 + \dots}}}$$

$$x(22) = 4 + \frac{6}{8 + \frac{6}{8 + \frac{6}{8 + \dots}}}$$

$$x(24) = 4 + \frac{8}{8 + \frac{8}{8 + \frac{8}{8 + \dots}}}$$

Let us now calculate their values up to 14 decimal place using Excel sheet.
<table><caption>Table-2: CF calculations for decimal part d(n) and x</caption><thead><tr><th>Step</th><th>d(2)</th><th>d(3)</th><th>d(5)</th><th>d(10)</th><th>d(15)</th><th>d(19)</th><th>d(23)</th></tr></thead><tbody><tr><td>1</td><td>0.5000000000000000</td><td>1.0000000000000000</td><td>0.2500000000000000</td><td>0.1666666666666667</td><td>1.0000000000000000</td><td>0.3750000000000000</td><td>0.8750000000000000</td></tr><tr><td>2</td><td>0.4000000000000000</td><td>0.6666666666666667</td><td>0.23529411764706</td><td>0.16216216216216</td><td>0.85714285714286</td><td>0.35820895522388</td><td>0.78873239436620</td></tr><tr><td>3</td><td>0.4166666666666667</td><td>0.7500000000000000</td><td>0.2361111111111111</td><td>0.16228070175439</td><td>0.8750000000000000</td><td>0.35892857142857</td><td>0.79647435897436</td></tr><tr><td>4</td><td>0.41379310344828</td><td>0.72727272727273</td><td>0.23606557377049</td><td>0.16227758007117</td><td>0.87272727272727</td><td>0.35889767143773</td><td>0.79577336491164</td></tr><tr><td>5</td><td>0.41428571428571</td><td>0.7333333333333333</td><td>0.2360681145511</td><td>0.16227766227766</td><td>0.87301587301587</td><td>0.35889899815989</td><td>0.79583678541839</td></tr><tr><td>6</td><td>0.41420118343195</td><td>0.73170731707317</td><td>0.23606797003472</td><td>0.16227766011283</td><td>0.87297921478060</td><td>0.35889894119554</td><td>0.79583104720684</td></tr><tr><td>7</td><td>0.41421568627451</td><td>0.73214285714286</td><td>0.23606797791580</td><td>0.16227766016984</td><td>0.87298387096774</td><td>0.35889894364137</td><td>0.79583156638995</td></tr><tr><td>8</td><td>0.41421319796954</td><td>0.73202614379085</td><td>0.23606797747661</td><td>0.16227766016834</td><td>0.87298327955412</td><td>0.35889894353635</td><td>0.79583151941517</td></tr><tr><td>9</td><td>0.41421362489487</td><td>0.73205741626794</td><td>0.23606797750108</td><td><b>0.16227766016838</b></td><td>0.87298335467350</td><td>0.35889894354086</td><td>0.79583152366536</td></tr><tr><td>10</td><td>0.41421355164606</td><td>0.73204903677758</td><td>0.23606797749972</td><td>0.16227766016838</td><td>0.87298334513208</td><td><b>0.35889894354067</b></td><td>0.79583152328081</td></tr><tr><td>11</td><td>0.41421356421356</td><td>0.73205128205128</td><td><b>0.23606797749979</b></td><td></td><td>0.87298334634400</td><td>0.35889894354067</td><td>0.79583152331561</td></tr><tr><td>12</td><td>0.41421356205732</td><td>0.73205068043172</td><td>0.23606797749979</td><td></td><td>0.87298334619007</td><td></td><td>0.79583152331246</td></tr><tr><td>13</td><td>0.41421356242727</td><td>0.73205084163518</td><td></td><td></td><td>0.87298334620962</td><td></td><td>0.79583152331274</td></tr><tr><td>14</td><td>0.41421356236380</td><td>0.73205079844084</td><td></td><td></td><td>0.87298334620714</td><td></td><td><b>0.79583152331272</b></td></tr><tr><td>15</td><td>0.41421356237469</td><td>0.73205081001473</td><td></td><td></td><td>0.87298334620745</td><td></td><td>0.79583152331272</td></tr><tr><td>16</td><td>0.41421356237282</td><td>0.73205080691351</td><td></td><td></td><td>0.87298334620741</td><td></td><td></td></tr><tr><td>17</td><td>0.41421356237314</td><td>0.73205080774448</td><td></td><td></td><td><b>0.87298334620742</b></td><td></td><td></td></tr><tr><td>18</td><td>0.41421356237309</td><td>0.73205080752182</td><td></td><td></td><td>0.87298334620742</td><td></td><td></td></tr><tr><td>19</td><td><b>0.41421356237310</b></td><td>0.73205080758149</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>20</td><td>0.41421356237310</td><td>0.73205080756550</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>21</td><td></td><td>0.73205080756978</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>22</td><td></td><td>0.73205080756864</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>23</td><td></td><td>0.73205080756894</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>24</td><td></td><td>0.73205080756886</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>25</td><td></td><td><b>0.73205080756888</b></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>26</td><td></td><td>0.73205080756888</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>b<sub>0</sub></td><td>1</td><td>1</td><td>2</td><td>3</td><td>3</td><td>4</td><td>4</td></tr><tr><td>x</td><td>1.41421356237310</td><td>1.73205080756888</td><td>2.23606797749979</td><td>3.16227766016838</td><td>3.87298334620742</td><td>4.35889894354067</td><td>4.79583152331272</td></tr></tbody></table>

<table><caption>Table-3: Values of $\sqrt{n}$ calculated using Excel sheet</caption><thead><tr><th></th><th>x(2)</th><th>x(3)</th><th>x(5)</th><th>x(10)</th><th>x(15)</th><th>x(19)</th><th>x(23)</th></tr></thead><tbody><tr><td>n</td><td>2</td><td>3</td><td>5</td><td>10</td><td>15</td><td>19</td><td>13</td></tr><tr><td>√n</td><td>1.41421356237310</td><td>1.73205080756888</td><td>2.23606797749979</td><td>3.16227766016838</td><td>3.87298334620742</td><td>4.35889894354067</td><td>4.79583152331272</td></tr></tbody></table>

These calculations show that the above-mentioned CF's give the square root of natural numbers. The formulation was randomly tested for large numbers like 984567291 giving a square root value of 31377.8152681158. Another large number 894276903519472 was tested using this formulation, which resulted in square root value of 29904462.9364828. The method needs to be tested further using advanced computational tools.

It is interesting to note that for $n=1$, $b_0 = 1$, $b_1 = 2$ and $a_1 = 0$, the decimal part is zero. But if we take $a_1 = 1$ then the CF is expressed as

$$x(1) = 1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \dots}}}$$

Which is golden ratio ($\phi$), with approximate value of 1.6180339887499 upto 13th decimal place.

The most important observation is about how nicely the CF can be used to place $\sqrt{n}$ in a tabular form, as shown below.
<figure><img src="image_2.png" /><figcaption>Fig.: Square root of natural numbers in an infinite staircase pattern</figcaption></figure>

This elegant representation of $\sqrt{n}$ is not just limited to $\sqrt{99}$, but extends to the countably infinite natural numbers, as indicated by the three arrows. The golden ratio ($\varphi$) is placed at the top most position in the table.

**Lemma 1.1.**

Let $n \in \mathbb{N}$, and suppose $n = b_0^2 + a_1$ for some natural number $b_0 \ge 1$ and another natural number $a_1 \ge 1$. Let $x \in \mathbb{R}$ be a real number defined by the continued fraction expansion

$$x = b_0 + \frac{a_1}{2b_0 + \frac{a_1}{2b_0 + \frac{a_1}{2b_0 + \dots}}}$$

Then $x$ converges to $\sqrt{n}$

**Proof.**
Let $x$ be defined as:

$$x = b_0 + y$$

where

$$y = \frac{a_1}{2b_0 + y}$$

which can be expressed as a quadratic equation

$$y^2 + 2b_0y - a_1 = 0$$

the roots of this quadratic equation are

$$y = -b_0 \pm \sqrt{b_0^2 + a_1}$$

since $y$ represents a positive quantity (as part of the continued fraction), we take the positive root:

$$y = -b_0 + \sqrt{b_0^2 + a_1}$$

now, substitute back into the expression for $x$:

$$x = \sqrt{b_0^2 + a_1}$$

but from the hypothesis, $n = b_0^2 + a_1$, hence:

$$x = \sqrt{n}$$

## Conclusion

A remarkably elegant formulation, rooted in the theory of continued fractions, allows for the direct determination of square roots of natural numbers. This method systematically organizes continued fraction representations into a tabular structure, where each entry corresponds to a natural number and the size of the table extends across the countably infinite set of naturals. With this approach, one can efficiently derive the simplest continued fraction form for the square root of any non-square natural number. The inherent periodicity of these expansions not only simplify the representation of irrational roots but also reveal deep structural patterns across the number line, making this technique mathematically powerful and intuitively accessible.

## References

1. Atkinson, K. E. (1989). *An Introduction to Numerical Analysis* (2nd ed.). Wiley.

2. Boneh, D., & Durfee, G. (1999). *Cryptanalysis of RSA with Private Key d Less than N^0.292*. IEEE Transactions on Information Theory, 46(4), 1339–1349.
3. Burden, R. L., & Faires, J. D. (2011). *Numerical Analysis* (9th ed.). Cengage Learning.

4. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). *Introduction to Algorithms* (3rd ed.). MIT Press.

5. Hardy, G. H., & Wright, E. M. (1979). *An Introduction to the Theory of Numbers* (5th ed.). Oxford University Press.

6. Heath, T. L. (1921). *A History of Greek Mathematics, Volume I: From Thales to Euclid*. Oxford University Press.

7. IEEE Standard for Floating-Point Arithmetic (IEEE Std 754-2019), IEEE Computer Society, 2019.

8. Intel Corporation. (2020). *Intel 64 and IA-32 Architectures Optimization Reference Manual*.

9. Jones, W. B., & Thron, W. J. (1980). *Continued Fractions: Analytic Theory and Applications*. Encyclopedia of Mathematics and its Applications. Cambridge University Press.

10. Knuth, D. E. (1997). *The Art of Computer Programming, Volume 2: Seminumerical Algorithms* (3rd ed.). Addison-Wesley.

11. Khinchin, A. Ya. (1997). *Continued Fractions*. Dover Publications.

12. Koblitz, N. (1994). *A Course in Number Theory and Cryptography* (2nd ed.). Springer.

13. Lagrange, J. L. (1770). *Sur la résolution des équations numériques de tous les degrés*. Histoire de l'Académie Royale des Sciences.

14. Niven, I., Zuckerman, H. S., & Montgomery, H. L. (1991). *An Introduction to the Theory of Numbers* (5th ed.). John Wiley & Sons.

15. Olds, C. D. (1963). *Continued Fractions*. Random House.

16. Pólya, G., & Szegő, G. (1972). *Problems and Theorems in Analysis II*. Springer-Verlag.

17. Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (2007). *Numerical Recipes: The Art of Scientific Computing* (3rd ed.). Cambridge University Press.

18. Rockett, A. M., & Szüsz, P. (1992). *Continued Fractions*. World Scientific.

19. Rosen, K. H. (2012). *Discrete Mathematics and Its Applications* (7th ed.). McGraw-Hill.

20. Sant'Anna, V. A. S., & Sant'Anna, A. S. (1999). On the Babylonian method of extracting root squares. *arXiv preprint arXiv:math/9904020*.

21. Thoen, H. J., & Sarpeshkar, R. (2005). Energy-efficient precise analog square-root circuits. *IEEE Transactions on Circuits and Systems I: Regular Papers*, 52(8), 1469–1481.

22. Wall, H. S. (1948). *Analytic Theory of Continued Fractions*. D. Van Nostrand.

23. Weiss, M. A. (2012). *Data Structures and Algorithm Analysis in C++* (4th ed.). Pearson.