# Finding set of non recurring non terminating decimals

I need to find a set of two Integers P and Q such that P/Q comes out to be non recurring non terminating decimals . Such as 106951484895/47666297253.

How can we find such two numbers. Is there any formula for this?

I need the result to be a decimal that does not end, nor do the numberals repeat themselves in any recognizable sequence.

Example: 106951484895/47666297253 = 2.24375483430840090053512174785916761672572536877348541885492361677904883097801043287594504105040726394682939649060976328569701751152716078581955550664345621014373276853529464561869479096457226131837381633508104200383965998089941882484488017422971446512579402430136563475351346061895880989881427322957327423437070470786123178209350642720039431463073874604572487035088141630189988694987841412729755839421966691187327329614175517087337289424929857158670121550588652768665265722816433005640...

EDIT: From the comments I got that such numbers don't exist.

So how can I get Fractions which approximates Irrational numbers?

An example is Fraction such as 22/7 which is commonly used to approximate π

• What exactly do you mean by non-recurring? If it's supposed to mean that fractional digits aren't of the form $d_1\ldots d_i\ldots d_nd_i \ldots d_n d_i \ldots d_n \ldots$, then there are no such integers... – fgp Mar 10 '14 at 9:10
• a decimal that does not end, nor do the numberals repeat themselves in any recognizable sequence such as pi – Zeeshan Mar 10 '14 at 9:14
• Then there are no such integers. If you compute enough digits of $106951484895/47666297253$, you'll see that the result has the form stated in my first comment, i.e. after some point the fractional digits are just a repetition of the same block over and over again... – fgp Mar 10 '14 at 9:16
• Yes, Shaan, but you can't write $\pi$ as a quotient of two integers! – Gerry Myerson Mar 10 '14 at 9:17
• What you are looking for are called irrational numbers, and these, by definition, aren't representable as fractions. $\sqrt{2}$ has the properties you are looking for though... – fgp Mar 10 '14 at 9:18

In the comments, OP clarifies, "I want a fraction with a particularly long period in its decimal expansion."

The longest the period of $m/n$ can be is $n-1$ (because when you calculate the decimal expansion, the period begins when you see the same remainder twice, and there are only $n-1$ nonzero remainders available when you are dividing by $n$).

The period $n$ can only be achieved when $n$ is prime (because remainders that have a common factor with $n$ can't be achieved, and if $n$ isn't prime there are numbers between 1 and $n-1$ that have a common factor with $n$).

But not every prime number $n$ works. E.g., $13$ is prime, but the period of $m/13$ is $6$, not $12$ (try it!).

The primes $n$ for which you get period $n-1$ are tabulated at https://oeis.org/A001913, and the first 10,000 of them are listed at https://oeis.org/A001913/b001913.txt. It is widely believed, but not yet proved, that there are infinitely many of them.

Continued fractions are a way to go. See the English Wikipedia article for Continued Fraction, perhaps especially the section "Continued fraction expansion of $\pi$".

Here's a method for taking any string of digits and finding the fraction which has that string as its repeating period.

First, the string can't have any leading zeros. If it needs to have some, just move them to the end of the string and divide the resulting fraction by a power of ten.

If $S$ is a string without leading zeroes, first we have to convert $S$ to an integer $N$, for instance if $S$ is $(1, 2, 4, 5)$, then $N$ is $1245$. Now if $l$ is the length of $S$, we have:

$$0.\overline S = \frac{N}{10^{\space l} - 1}$$

For example, $0.\overline{1234} = \frac{1234}{9999}$.