0
$\begingroup$

I'm trying to solve the Collatz conjecture, and am having some trouble designing a function that divides a number by two until it's odd.

Here is what I've thought of.

We know $a\mod b = \arctan(\tan(\frac{a\pi}{b}-\frac{\pi}2))\frac{b}\pi + \frac{b}2 $

Thus,

$$f(x) = \frac{x}2 + \frac{x}2(x \mod 2) = \frac{x}2 + \frac{x}2(arctan(\tan(\frac{x\pi}{2}-\frac{\pi}2))\frac{2}\pi + \frac{2}2) = \frac{x}2 + \frac{x}2(arctan(\tan(\frac{x\pi}{2}-\frac{\pi}2))\frac{2}\pi +1)$$

What would this do? This function would return half the number, if $ x \mod 2 = 0$, else, return the whole number, because it's already odd.

The thing is, if I want to make sure any number is odd, I'd have to iterate this infinite times. I know some functions are easily iterated, but can all functions be iterated in theory? I know it may be hard, but the whole conjecture is tough by itself, so I don't really care.


One extra question, notice

$$a\mod b = \arctan(\tan(\frac{a\pi}{b}-\frac{\pi}2))\frac{b}\pi + \frac{b}2 = (\frac{a\pi}{b}-\frac{\pi}2)\frac{b}\pi + \frac{b}2$$

Is this simplification correct?

EDIT: The simplification collapses to $ a \neq a \mod b$, so that's out of the question.

$\endgroup$
  • $\begingroup$ Why would you use trig functions to such an end? Just write $x$ in base two, and let your function remove all the zeros from the least significant end (shifting the bits towards the low end by an appropriate number of positions). $\endgroup$ – Jyrki Lahtonen Mar 18 '17 at 12:33
  • $\begingroup$ How would you write that in a functional form? I'm trying to get to a proof for the Collatz conjecture, not just check numbers at random. $\endgroup$ – ChemiCalChems Mar 18 '17 at 12:34
  • $\begingroup$ Something like: While (x AND 1)==0 do (x>>1); $\endgroup$ – Jyrki Lahtonen Mar 18 '17 at 12:37
  • $\begingroup$ Again, I'm not trying to write a computer program. I want a mathematical function to use in the proof for the conjecture. $\endgroup$ – ChemiCalChems Mar 18 '17 at 12:38
  • $\begingroup$ Then $f(x)=x/2^{\nu_2(x)}$, $\nu_2(x)$ is the mathematical function that calculates how many times $2$ is a factor of the integer $x$. $\endgroup$ – Jyrki Lahtonen Mar 18 '17 at 12:40
3
$\begingroup$

If you insist on using trig functions you can do the following. Consider the sequence of functions $$ \begin{aligned} f_0(x)&=1,\\ f_1(x)&=\frac12(1+\cos\pi x),\\ f_2(x)&=\frac14(1+\cos\frac{\pi x}2+\cos\pi x+\cos\frac{3\pi x}2),\\ \vdots&\qquad\\ f_k(x)&=\frac1{2^k}\sum_{j=0}^{2^k-1}\cos\frac{j\pi x}{2^{k-1}},\\ \vdots&\qquad \end{aligned} $$ At integer points they have the properties:

  • $f_0(n)=1$ for all $n\in\Bbb{N}$,
  • $f_1(n)=1$ when $2\mid n$ and $f_1(n)=0$ at other integer points,
  • $f_2(n)=1$ when $4\mid n$ and $f_2(n)=0$ at other integer points,
  • $f_k(n)=1$ when $2^k\mid n$ and $f_k(n)=0$ at other integer points.

Therefore the series $$ F(n):=f_0(n)-\frac12f_1(n)-\frac14f_2(n)-\cdots=1-\sum_{k=1}^\infty 2^{-k}f_k(n) $$ has the value $F(n)=2^{-\nu_2(n)}$ at any integer $n$.

Consequently $$ x F(x) $$ divides an integer $x$ by all the powers of two that still produce an integer.

Unless I made a mistake the series $F(x)$ converges uniformly everywhere, so it is a continuous function. Here's a plot of the sum of the first five terms, call it $S_4(x)$, in the interval $x\in[0,16]$.

enter image description here

Here's the corresponding plot of $x S_4(x)$.

enter image description here

I doubt you can approach Collatz in this way, but who am I to forbid anyone to think outside the box :)

$\endgroup$
  • $\begingroup$ So if I understand, the function gives the odd number that arises after dividing by two as many times as possible? You sure are a genius. I admire you deeply. In case this thinking-out-of-the-box arrives somewhere, I will cite you everywhere, because this is the cornerstone I was looking for. $\endgroup$ – ChemiCalChems Mar 18 '17 at 17:35
  • $\begingroup$ Now I'll only have to deal with infinite summations, but that isn't really that big of a problem. $\endgroup$ – ChemiCalChems Mar 18 '17 at 17:59
0
$\begingroup$

Let $f(x) = b^x $ with $b=\sqrt{2}$ then $f(1)$,$f(f(1))$, ..., $f°^h(1)$ are all well defined and computable and converging to $c=2$.
We can even use the analytial result that the limit of infinite iteration is equal to $2$ and can therefor derive from that any further (appropriate) corrolary, lemma or theorem in all generality (well, for bases $b$ with appropriate values) ...

Another example: let $g(x) = x/2 $ then we can iterate $g(1)$,$g(g(1))$ ... $g°^h(1)$ and even can say an analytical result for the sum of all iterates : this is the geometric series and evaluates to $1+ g(1) + g°^2(1) + g°^3(1)... = 2$

$\endgroup$
  • $\begingroup$ I have been quite interested in iterated functions for some time, and I realize functions as trivial as these are computable. The problem is with the function above. I'm sure I'd take ages, but it must be possible for any function, right? $\endgroup$ – ChemiCalChems Mar 18 '17 at 14:15
  • $\begingroup$ @ChemiCalChems : Well, I'm not a professional mathematician and I cannot say, whether your intended function exists or not (I doubt that it exists) but your question was then insofar a bit unspecific: I'd understood you asked whether there is any function with the analytical property when iterated, so ... $\endgroup$ – Gottfried Helms Mar 18 '17 at 14:20
  • $\begingroup$ When I said any, I meant all functions. There has to be a simpler way to solve the conjecture. Maybe it really has to do with finding $\nu_2(x)$ in terms of elemental functions. $\endgroup$ – ChemiCalChems Mar 18 '17 at 14:21
  • $\begingroup$ @ChemiCalChems : yes, I think that would be the best expression for other mathematicians to understand the real question... $\endgroup$ – Gottfried Helms Mar 18 '17 at 14:22
  • $\begingroup$ Edited the question. $\endgroup$ – ChemiCalChems Mar 18 '17 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.