# What are the special characteristics of a natural number X where any integral number Y divided by X yields a repeating number? [duplicate]

To start off, my apologies if this question may come off as illogical.

Let us take a natural number X and integral number Y and compute Y / X. We see that for values of X, such as 11 or 37, no matter what Y is, X will be a repeating number. Yes, I do realize that there are some values of Y that do not agree with this case, such as 3/12 (in which X = 12 and Y = 3). However, for the purpose of this question, we will consider 0.25 (the quotient of 3/12) as a repeating decimal (0.2500...). This is only for the purpose of the question.

Examples for 11 include 5/11 (0.4545...) and 22/11 (2.000...). 37 works as well. Examples include 9/37 (0.243...) and 11/37 (0.297). Now, moving onto the question:

What are the characteristics of numbers like X, beyond primes? Numbers such as 1, 2 (prime), 3 (prime), 5 (prime), 6, 8, 9, 10, 11 (prime), 12... even 37 (where any integral number Y produces a "repeating" decimal) but not 7, 13, 17, 19, 21, 23, 29...

Again, my apologies if this question seems badly worded/illogical. Curiosity formed this inquiry.

• If (eventually) repeating zeros are included in what you've called "a repeating number", then any $X$ (if by natural number you exclude zero) divides any integer $Y$ to give "a repeating number" (also known as a rational number). – hardmath Mar 29 '16 at 3:23
• What is your question? The decimal expansion of every rational number repeats eventually. – Robert Israel Mar 29 '16 at 3:23
• @hardmath Yes, my definition of repeating numbers also falls under the category of rational numbers (I used the term repeating decimals since most cases have repeating decimals). You could rephrase the question to ask "What are the characteristics of numbers like X such as any integral number Y / X yields a rational number?" – Mario Ishac Mar 29 '16 at 3:27
• It is confusing because the title refers to $X$ as "a natural number". Dividing an integer by a (nonzero) natural number will give a rational number every time. It's one way to define what the rational numbers are. – hardmath Mar 29 '16 at 3:30
• Why do you say that $8$ produces a "repeating" decimal, but "not $7$..."? You will find that $1/7 = 0.142857142857...$ repeats with a cycle of length six. – hardmath Mar 29 '16 at 11:19

If you take $\frac{x_1...x_n}{9...9}$ where there are $n$ copies of $9$ in the denominator you'll get the repeating decimal $.x_1x_2...x_nx_1x_2..x_n...$ where the sequence $x_1x_2...x_n$ keeps repeating.
For example, $\frac{1234}{9999}=.12341234...$.
The numbers you point out all divide a number that consists of some sequence of $9$s.
$37\cdot27=999$ so $\frac{9}{37}=\frac{243}{999}$ and $\frac{5}{11}=\frac{45}{99}$, etc.