elementary number theory – Algorithm about binary numeral system

Here is an algorithm about binary numeral system :

Given a positive real number $A in (0,1)$ with $A=(a_1a_2a_3…)_2$,then we can choose these $a_i$‘s such that for each $k$,$a_ka_{k+1}…$ is not equal to $11…$ (why?)

How do we know that for every $k$ we are able to find $a_i$‘s such that $a_ka_{k+1}…$ is not equal to $11…$?

We see that $$A=sum_{kge1}^{ }2^{-k}a_{k}$$

$$2A=a_{1}+sum_{kge2}^{ }2^{-k+1}a_{k}$$

Let $sum_{kge2}^{ }2^{-k+1}a_{k}=b$,then since for each $a_i$ we have that $a_i ge 0$ follows that $b ge 0$,moreover $$b<sum_{kge1}^{ }2^{-k}=1$$,hence $$ lfloor {2A}rfloor=lfloor {a_1+b}rfloor=a_1$$

This can be used to determine $a_2,a_3,….$.

elementary number theory – continued fraction formula . pls help

I’m self studying this book “Methods of Solving Number theory Problems by Elina” since many days but currently stuck on this formula of continued fractions. enter image description here

For example $a=87/
55
= [1,1,1,2,1,1,4]$
in continued fraction. but when I put the values according to the formula I don’t get the answer to being $a=87/55$. what am I missing, if someone can explain this in simple words, it will be very helpful. Thanks

elementary number theory – Beal’s Conjecture can the following be proved?

According to wikipedia’s page on Beal’s Conjecture, it states: $A^x + B^y = C^z$, where $A, B, C, x, y$ and $z$ are positive integers and $x, y$ and $z$ are all greater than $2$, then $A, B$ and $C$ must have a common prime factor.

The following will lead to my question:

Let us have a consecutive set $A$ of elements $x^2$: $1, 4, 9, 16, 25, 36 , 49, 64 ,81, 100…$

The set’s elements are growing in a rate, that results in the following set $B$ with elements $y$$3,  5 , 7,$  *9 $, 11, , 13 , 15, 17, 19$   (growing at $y+2$)

*Note $9 = 3^2$

Since the Beal’s conjecture has no restrictions on $x^2$

Let’s move to a consecutive set $A$ of elements $x^3$: $1, 8,  27,  64, 125, 216, 343 , 512 ,729, 1000…$

The set’s elements are growing in a rate that results in the following set $B$ with elements $y$$7,  19 , 37,   61, 91, 127 ,$ *169 $, 217, 271 …$  (growing $12, 18,  24, 30 …$)

Needless to demonstrate other sets of $x^z$: is there a way to prove that $y$ in set $B$ can only result as $x^2$ such as *$169$ which is $13^2$ and cannot be any other $x^z$ where $z$ is bigger than $2$ (such as: $x^3$, $x^4$ ….)?

It is way above my level to try and prove the Beal’s conjecture and I am not trying to demonstrate any general proof, however my question is whether it can be proved that at least for any
$x^z – (x-1)^z$, it can only end in $x^2$ and never in $x^z$ where $z$ > 2?

If not, whether it can be partially proved for a specific $z$, example such as in the case of $x^3 – (x-1)^3$ where $z=3$?

complexity theory – An elementary question about domain in Karp reductions

A basic question or request for clarification regarding Karp reducibility:

Let $Sigma^*$ be the set of all finite strings of 0’s and 1’s. Call a subset of $Sigma^*$ a language. Let $Pi$ denote the set of all functions from $Sigma^*$ into $Sigma^*$ that are computable in polynomial time. According to Karp, a language $L$ is reducible to a language $M$, also denoted $L leq_K M$, if there is a function $f in Pi$ such that $f(x) in M Leftrightarrow x in L$.

For many problems, however, we are interested in the difficulty of determining membership in subsets of domains other than $Sigma^*$. To address this, Karp briefly discusses encodings: Given a domain $D$, there is often a natural “one-one” encoding, $e: D rightarrow Sigma^*$. He then says that given a set $T subset D$, $T$ is recognizable in polynomial time if $e(T) in mathcal{P}$. But don’t we, in practice, typically consider $T$ to be recognizable in polynomial time if, for any $x in D$, we can determine whether $x in T$ in polynomial time? On the face of it, this doesn’t seem to be the same as Karp’s definition, since there is no guarantee that $e(D) = Sigma^*$.

Similarly, according to Karp, $T leq_K U$ where $T subset D$ and $U subset D’$ if $e(T) leq_K e'(U)$ where $e: D rightarrow Sigma^*$ and $e’: D’ rightarrow Sigma^*$. However, when we are actually proving $T leq_K U$ for some real $T$, $U$, $D$, and $D’$, don’t we frequently just define an $f: D rightarrow D’$ computable in polynomial time, confirm that $f(x) in D’$ for any $x in D$, and show that $f(x) in U Leftrightarrow x in T$ for any $x in D$? Again, this doesn’t seem to be the same thing as Karp’s definition if $e(D) neq Sigma^*$.

What am I missing?

elementary number theory – Problem regarding a MST proof of 0.99999…=1

I came across an answer of this (which is the highest voted, and also awarded bounties worth 50 reputations).
To quote, this is what the answer said:-

“Suppose this was not the case, i.e. $0.9999… neq 1$. Then $0.9999… < 1$ (I hope we agree on that). But between two distinct real numbers, there’s always another one (say $x$) in between, hence $0.9999… < x < 1$.

The decimal representation of $x$ must have a digit somewhere that is not $9$ (otherwise $x = 0.9999…$). But that means it’s actually smaller, $x < 0.9999…$, contradicting the definition of $x$.

Thus, the assumption that there’s a number between $0.9999…$ and $1$ is false, hence they’re equal.”

I have a problem regarding this, it merely tells that there exists no $x$ such that $$0.999…<x<1$$ and thus reaches the conclusion that $$0.9999…=x$$ What am I missing?

elementary number theory – A weird algorithm for finding the square root of any integer

A weird algorithm for finding the square root of any integer
goes as the following:

example $√25$: $25 – 1 -3 – 5 – 7 – 9 = 0$

We have deducted 5 numbers (-1, -3, -5, -7, -9) without resulting in a negative number, and thus the answer is 5

example $√27$: $27 – 1 -3 – 5 – 7 – 9 = 2$

We have deducted 5 numbers (-1, -3, -5, -7, -9) without resulting in a negative number, and thus the answer is 5.?, but in this case we have a remainder of 2 and thus we have to complete a decimal for 5.?

We have two ways to deal with the remainder:

First way: We can multiply $27 * 100$, or $27 * 10000$ or $27 * 1000000$ (every additional 00 will result in a more precise answer:

$2700 – 1 -3 -5 -7 -9 -11 -13 -15 -17 -19 -21 -23 -25 -27 -29 -31 -33 -35 -37 -39 – 41 -43 -45 -47 -49 -51 -53 -55 -57 -59 -61 -63 -65 -67 -69 -71 -73 -75 -77 -79 -81 -83 -85 – 87 -89 -91 -93 -95 -97 -99 -101 = 99$

We have deducted 51 numbers and there for we know the first decimal for √27 = 5.1?

the more 00’s we put at the end of 27, the more decimals we will get.

Second way: $27−1−3−5−7−9=2$ We take the remainder of 2 and divide it by what would of been the next number to deduct in the sequences. In this case it would of been 11

$2/11 = 0.18181818181818….$

Here is the funny thing: We then take the result and we can add it to what would of been the next number to deduct in the sequence minus 1. In this case 11-1 = 10 and 10 + 0.18181818181818 = 10.181818181818

$2/10.181818181818181818 = 0.19642857142857142$

and we repeat the process until there is no more change:

$2/10.19642857142857142 = 0.19614711033274956$

$2/10.19614711033274956 = 0.19615252490553076$

$2/10.19615252490553076 = 0.1961524207405411$

$2/10.1961524207405411 = 0.19615242274445532$

$2/10.19615242274445532 = 0.19615242270590422$

At the end when there is no more change (and without rounding the results to begin with)

$√27 = 5.196152422706631880582….$

The first way is self explanatory, but the second way is very weird.
Why is it that first we divide by what would be the next number in the sequence and then we can take the decimal and add it to the next number minus 1? And why repeating the step of adding the result decimal to the next number in the sequence minus 1, acts as a sieve for sharpening the answer?

elementary set theory – Cofinal linear ordered sets

Let <A,≺ > is a linear ordered set which does not have a largest element.

For a set X, X ⊆ A, is said to be cofinal with A, if: (∀a ∈ A)(∃x ∈ X)(a ≺ x).

Prove that there exists B, B ⊆ A, which is cofinal with A and <B,≺> is well ordered set.

My attempt: Will use recursion,namely if we define a property φ, such that for ∀x∃y(φ,x,y).

Then for every A there exists set B, such that:∀y(y∈B)↔(∃x|x∈A & (φ,x,y) ).

But this property φ,x,y I will use to define a surjection over an ordinal α-the largest limit ordinal which I will consider to be Limit(α), here I use the fact that ¬max α’∈A. This surjection will be:
f:α ↦A. Which for an arbitrary x∈α will return s(x)≤α,namely f(x)=s(x). If however x>a, then x=α+n. Hence we have showed the existence of such x:a ≺ x. Then this says that for this defined operation and the set A, there exists other set B(unique) satisfying the property.
However I do not know what else I need to do to get further.

elementary set theory – $(0,1)$ without union of intervals centered at rational numbers

Let $(a_n)$ be a sequence of all rational numbers in $(0,1)$ and let
$$mathscr{I}_t:=bigcup_ileft(a_i-frac{t}{2^{i+1}},a_i+frac{t}{2^{i+1}}right)bigcap,(0,1)text{.}$$
Then $lambda(mathscr{I}_t)leq t$ because $displaystylesum_nfrac{t}{2^n}=t$ where $lambda$ is the Lebesgue measure. That means $mathscr{I}_tsubsetneq(0,1)$ for $t<1$.

I’m trying to understand what $(0,1)setminusmathscr{I}_t$ looks like and in which way it depends on the enumeration of the rationals.

My thoughts: Obviously it would only contain irrational numbers. Any $xin(0,1)setminusmathscr{I}_t$ has to satisfy $mid x-a_imid<frac{t}{2^{i+1}}forall i$. But I’m trying to build an intuitive understanding and don’t know how such an $x$ would look like.

elementary set theory – For $boldsymbol{n} in mathbb{N}$, does $boldsymbol{n} notin boldsymbol{n}$ rely on the Axiom of Regularity?

From the axiom of regularity:

begin{equation}
left(forall xright)left(x neq emptyset longrightarrow left(exists y in xright)left(y cap x = emptysetright)right),
end{equation}

we are able to deduce that $x not in x$ for any set $x$ in the ZF language system. Consequently, for every $boldsymbol{n} in mathbb{N}$, we have $boldsymbol{n} not in boldsymbol{n}$. Is it possible to deduce the same conclusion using only the definition of natural numbers? That is, to deduce $boldsymbol{n} notin boldsymbol{n}$ using only $boldsymbol{0} = emptyset$ and $boldsymbol{n} = boldsymbol{n} cup left{boldsymbol{n}right}$.

elementary number theory – If $a$ and $b$ are relatively prime, show that $a+b$ and $ab$ are also relatively prime.

Suppose that $gcd(a,b) =1$.

Let $d=gcd(a+b,ab)$.

Now $dvert (a+b)$ and $dvert ab$.

Suppose that $d vert a$.

Then $a = dq_a$.

Now examining $a+b = dq_1$ we have
$dq_a + b = dq_1$
$b = d(q_1 – q_a)$

So then $dvert b$ and $d=1$.

A similar argument shows $dvert b$ implies $dvert a$. So we know that $dvert a$ or $dvert b$ implies $d=1$.

Suppose that $dnmid b$ and $d nmid a$.

Claim that $b leq d$.
We have
$a+b = dq_1$
$a = dq_1 – b$.
Here we have that $gcd(a, -b) = 1 = gcd(a,d)$ (this is from a Lemma used in the proof of the Euclidean Algorithm).

We can also derive that $gcd(b,-a) = 1 = gcd(b,d)$.

So we know that $a$ and $d$ and $b$ and $d$ are both relatively prime.

Considering $dvert ab$ we know by Euclid’s Lemma that since $a$ and $d$ are relatively prime implies that $d vert b$. This contradicts our assumption, so this case is not possible.

Therefore, we may conclude that $d=1$. $square$