1

Question:

Find $n\in \mathbb N$ such that $n \gt 1$ and the binary expansion of $\frac{1}{n}$ terminates.


My try:

I know an algorithm for writing the binary expansion.

Step 1: Consider $n \in \mathbb N$ and $A \in (0,1)$
Step 2: For $i$ from $1$ to $n$, do the following, as long as $A>0$.
Sub-step 2-1: $a \leftarrow[2A]$
Sub-step 2-2: Write $a$
Sub-step 2-3: $A \leftarrow2A-a$

For a binary expansion to terminate by this method, I need to be sure that in the $n$ iterations, $A$ doesn't take repetitive values. (For example, It shouldn't be equal to $0.2$, Both at the 3rd and 5th iterations)

But i don't know how to make sure that this never happens.

Note: The point is not finding just $1$ number.Finding a sufficient condition for $A$ to not be repetitive, matters.

Any idea?

  • You shouldn't take too long to find an $n>1$ with $1/n$ having a terminating binary representation. – Angina Seng Sep 01 '17 at 06:23
  • @LordSharktheUnknown I know what u mean :) It would be better to find a sufficient condition. Not just finding $1$ number. – Arman Malekzadeh Sep 01 '17 at 06:24
  • Do you know which fractions $\frac 1n$ have terminating decimal expansions? Have you tried starting with some terminating binary expansions and seeing what happens when you convert them to fractions - you will not necessarily get $\frac 1n$ of course, but you might get some clues which are helpful. – Mark Bennet Sep 01 '17 at 06:35

1 Answers1

2

To have a terminating binary expansion, you have to be able to multiply your rational by some $2^k$ and get an integer. What numbers of the form $\frac 1n$ satisfy that?

Ross Millikan
  • 374,822