0

Starting from an odd number $n$, example analyzing the sequence for $\quad n=57$

$57\quad\rightarrow 172\rightarrow 86\rightarrow 43\rightarrow 130\rightarrow 65\rightarrow 196\rightarrow 98\rightarrow 49\rightarrow 148\rightarrow 74\rightarrow 37\rightarrow 112\rightarrow 56\rightarrow 28\rightarrow 14\rightarrow 7\rightarrow 22\rightarrow 11\rightarrow 34\rightarrow 17\rightarrow 52\rightarrow 26\rightarrow 13\rightarrow 40\rightarrow 20\rightarrow 10\rightarrow 5\rightarrow 16\rightarrow 8\rightarrow 4\rightarrow 2\rightarrow 1$

find the next odd elements of the sequence:

$n_o^1=43;\quad n_o^2=65;\quad n_o^3=49;\quad n_o^4=37;\quad n_o^5=7;\quad n_o^6=11;\quad n_o^7=17;\quad n_o^8=13;\quad n_o^9=5;\quad n_o^{10}=1$

we indicate with $k_o$ the number of odd elements and with $k_e$ the number of even elements of the sequence therefore:

$k_o=10$

$k_e=22$

We know that starting from an odd number it is possible to find the following odd numbers in the sequence using the following formula:

$n_o^1=\frac{3 \cdot n +1}{2^{a_1}}$

$n_o^2=\frac{3 \cdot n_o^1 +1}{2^{a_2}}$

$\cdots$

so in our example we have:

$n_o^1=43=\frac{3 \cdot 57 +1}{2^2}$

$\cdots$

$a_1=2;\quad a_2=1;\quad a_3=2;\quad a_4=2;\quad a_5=4;\quad a_6=1;\quad a_7=1;\quad a_8=2;\quad a_9=3;\quad a_{10}=4 $

and

$k_e=22=a_1+a_2+ \ldots +a_{10}$

From which it follows that in case the sequence reaches the number $1$ we have:

$$n = \frac{2^{k_e}-b}{3^{k_o}}\tag1$$

$$b = \sum_{i=0}^{k_o-2} {3^{i} \cdot 2^{\left(\sum_{j=1}^{k_o-1-i} {a_{j}}\right)}} \quad + \quad 3^{k_o-1} $$

applying $(1)$ to our example we have:

$57=\frac{2^{22}-828511}{3^{10}}$

$828511=2^{18}+3 \cdot 2^{15}+3^2 \cdot 2^{13}+3^3 \cdot 2^{12}+3^4 \cdot 2^{11}+3^5 \cdot 2^7+3^6 \cdot 2^5+3^7 \cdot 2^3+3^8 \cdot 2^2+3^9$


If we now set $\quad a_1=4 \quad$ we obtain $\quad n=229 \quad$

$229=\frac{2^{24}-3254995}{3^{10}}$

$3254995=2^{20}+3 \cdot 2^{17}+3^2 \cdot 2^{15}+3^3 \cdot 2^{14}+3^4 \cdot 2^{13}+3^5 \cdot 2^9+3^6 \cdot 2^7+3^7 \cdot 2^5+3^8 \cdot 2^4+3^9$

But if we set $\quad a1=3\quad$ we don't find any solution.

Is there a way to understand if given a combination $(a_1,a_2, \cdots ,a_m)$ you can find a number $n$ that has that sequence as a solution?

Edit

I thought that a sequence of odd numbers could be found (skipping some numbers of the original sequence) in such a way as to always obtain numbers lower than the previous one.

I started making this chart but already analyzing the number $27$ I encountered some difficulties.

enter image description here

Example:

considering the sequence of odd numbers $\quad 19 \rightarrow 29 \rightarrow 11 \quad$ can be directly simplified to $\quad 19 \rightarrow 11 \quad$

just as $ \quad 51 \rightarrow 77 \rightarrow 29 \quad$ can be simplified directly to $\quad 51 \rightarrow 29 \quad$

and then considering $\quad (9\cdot n +5)/16 \quad$ we have $ \quad (19+32\cdot k) \rightarrow (11 +18\cdot k) $

Note that in this case $a_1=1,\quad a_2=3 \quad$ and $\quad n_o^2 = \frac{3^{k_0}\cdot n+b}{2^{k_e}} \quad$with$\quad k_o=2,\quad k_e=4, \quad $and $\quad b=5$

For the numbers $\quad 3 \pmod {16 } \quad$ I think you can see a pattern like you can see in the graph.

Do you think you can complete the graph above?

Edit:

I haven't found a complete scheme for the graph yet but here OEIS A020914 I found an indication for the exponents to be used for the modulus $2^c$ then for $x\geq 0$ we have:

$n\rightarrow\frac{3 \cdot n+1}{2^{2 \cdot x+2}} \quad $ if $\quad n \equiv \frac{2^{2 \cdot x+2}-1} {3} \pmod {2^{2 \cdot x+3}}$

$n\rightarrow \frac{3 \cdot n+1}{2^{2 \cdot x+3}} \quad $ if $\quad n \equiv \frac{5 \cdot 2^{2 \cdot x+3}-1}{3} \pmod {2^{2 \cdot x+4}}$

$$$$

$n\rightarrow \frac{9 \cdot n+5}{2^{6 \cdot x+4}} \quad $ if $\quad n \equiv \frac{11 \cdot 2^{6 \cdot x+4}-5} {9} \pmod {2^{6 \cdot x+5}}$

$n\rightarrow \frac{9 \cdot n+5}{2^{6 \cdot x+5}} \quad $ if $\quad n \equiv \frac{ 2^{6 \cdot x+5}-5}{9} \pmod {2^{6 \cdot x+6}}$

$n\rightarrow \frac{9\cdot n+5}{2^{6 \cdot x+6}} \quad $ if $\quad n \equiv \frac{5 \cdot2^{6\cdot x+6}-5} {9} \pmod {2^{6 \cdot x+7}}$

$n\rightarrow \frac{9 \cdot n+5}{2^{6 \cdot x+7}} \quad $ if $\quad n \equiv \frac{7 \cdot 2^{6\cdot x+7}-5}{9} \pmod {2^{6 \cdot x+8}}$

$n\rightarrow \frac{9 \cdot n+5}{2^{6 \cdot x+8}} \quad $ if $\quad n \equiv \frac{17 \cdot2^{6 \cdot x+8}-5} {9} \pmod {2^{6 \cdot x+9}}$

$n\rightarrow \frac{9\cdot n+5}{2^{6 \cdot x+9}} \quad $ if $\quad n \equiv \frac{13 \cdot 2^{6 \cdot x+9}-5}{9} \pmod {2^{6 \cdot x+10}}$

$$$$ $n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+5}} \quad $ if $\quad n \equiv \frac{47 \cdot 2^{18 \cdot x+5}-19} {27} \pmod {2^{18 \cdot x+6}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+6}} \quad $ if $\quad n \equiv \frac{37 \cdot 2^{18 \cdot x+6}-19} {27} \pmod {2^{18 \cdot x+7}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+7}} \quad $ if $\quad n \equiv \frac{5 \cdot 2^{18 \cdot x+7}-19} {27} \pmod {2^{18 \cdot x+8}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+8}} \quad $ if $\quad n \equiv \frac{43 \cdot 2^{18 \cdot x+8}-19} {27} \pmod {2^{18 \cdot x+9}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+9}} \quad $ if $\quad n \equiv \frac{35 \cdot 2^{18 \cdot x+9}-19} {27} \pmod {2^{18 \cdot x+10}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+10}} \quad $ if $\quad n \equiv \frac{31 \cdot 2^{18 \cdot x+10}-19} {27} \pmod {2^{18 \cdot x+11}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+11}} \quad $ if $\quad n \equiv \frac{29 \cdot 2^{18 \cdot x+11}-19} {27} \pmod {2^{18 \cdot x+12}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+12}} \quad $ if $\quad n \equiv \frac{ 2^{18 \cdot x+12}-19} {27} \pmod {2^{18 \cdot x+13}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+13}} \quad $ if $\quad n \equiv \frac{41 \cdot 2^{18 \cdot x+13}-19} {27} \pmod {2^{18 \cdot x+14}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+14}} \quad $ if $\quad n \equiv \frac{7 \cdot 2^{18 \cdot x+14}-19} {27} \pmod {2^{18 \cdot x+15}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+15}} \quad $ if $\quad n \equiv \frac{17 \cdot 2^{18 \cdot x+15}-19} {27} \pmod {2^{18 \cdot x+16}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+16}} \quad $ if $\quad n \equiv \frac{49 \cdot 2^{18 \cdot x+16}-19} {27} \pmod {2^{18 \cdot x+17}}$

$n\rightarrow \frac{27\cdot n+19}{2^{18 \cdot x+17}} \quad $ if $\quad n \equiv \frac{11 \cdot 2^{18 \cdot x+17}-19} {27} \pmod {2^{18 \cdot x+18}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+18}} \quad $ if $\quad n \equiv \frac{19 \cdot 2^{18 \cdot x+18}-19} {27} \pmod {2^{18 \cdot x+19}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+19}} \quad $ if $\quad n \equiv \frac{23 \cdot 2^{18 \cdot x+19}-19} {27} \pmod {2^{18 \cdot x+20}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+20}} \quad $ if $\quad n \equiv \frac{25 \cdot 2^{18 \cdot x+20}-19} {27} \pmod {2^{18 \cdot x+21}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+21}} \quad $ if $\quad n \equiv \frac{53 \cdot 2^{18 \cdot x+21}-19} {27} \pmod {2^{18 \cdot x+22}}$

$n\rightarrow \frac{27 \cdot n+19}{2^{18 \cdot x+22}} \quad $ if $\quad n \equiv \frac{13 \cdot 2^{18\cdot x+22}-19} {27} \pmod {2^{18 \cdot x+23}}$ $$$$ $n\rightarrow \frac{27 \cdot n+23}{2^{18 \cdot x+5}} \quad $ if $\quad n \equiv \frac{37 \cdot 2^{18 \cdot x+5}-23} {27} \pmod {2^{18 \cdot x+6}}$

$n\rightarrow \frac{27 \cdot n+23}{2^{18 \cdot x+6}} \quad $ if $\quad n \equiv \frac{5 \cdot 2^{18 \cdot x+6}-23} {27} \pmod {2^{18 \cdot x+7}}$

$\cdots$ $$$$ $n\rightarrow \frac{81\cdot n+65}{2^{54 \cdot x+7}} \quad $ if $\quad n \equiv \frac{91 \cdot 2^{54 \cdot x+7}-65} {81} \pmod {2^{54 \cdot x+8}}$

$n\rightarrow \frac{81 \cdot n+65}{2^{54 \cdot x+8}} \quad $ if $\quad n \equiv \frac{5 \cdot 2^{54 \cdot x+8}-65} {81} \pmod {2^{54 \cdot x+9}}$

$\cdots$

  • From an existing "key" $[a_1,a_2,...,a_{k_o}]$ for some $n_0^1$ you can only hope to find another existing "key" when you increase $a_1$ by $2$ or $4$ or another even value, not by $1$, $3$ or another odd value. (I think this is relatively easy to show...) – Gottfried Helms Mar 02 '23 at 08:49
  • @Gottfried Helms, indeed, as I said in my answer, this is for the division by 3 to still work. From $\frac{b\cdot2^a-1}{3}$ it can be shown by using $b\cdot2^a\equiv 1\mod 3$ and $2^2\equiv 1\mod 3$ – Collag3n Mar 02 '23 at 09:31
  • My aim was to understand if fixed $k_o$ or alternatively $k_o+ k_e$ it was possible to determine exactly the number of possible combinations that are the solution of the problem – user140242 Mar 02 '23 at 09:44
  • Every parity vector has a solution with a starting value $n_0$ and an ending value $n_0^{k_o}$ (which is rarely 1). And as you can see, if $k_e$ is not limited and you want to keep the same ending value, there are an infinity of solutions. Now is your question about keeping the same ending value (1?) and having a fixed $k_e$? – Collag3n Mar 02 '23 at 09:53
  • @Collag3n I do not know in which of the two conditions a solution can be found. But for example fixed $k_o$ and $k_e$ max, I think we can determine the maximum number of potential solutions, I wanted to know if it is possible to calculate the exact number of solutions with $n_o^{k_o}=1$. – user140242 Mar 02 '23 at 09:57
  • Not simple at all. You would need to know the parity of the $a_j$ of each level. That's why we said "unless you start with an existing sequence" where the parity are known – Collag3n Mar 02 '23 at 10:51
  • 1
    Question by same user on MO, https://mathoverflow.net/questions/448397/first-odd-term-of-the-sequence-lower-odd-number-n-related-to-the-3-cdot-n1 – Gerry Myerson Jun 08 '23 at 03:31

2 Answers2

1

No simple way (unless you start from an existing sequence).

Pick any $a_i$ in your sequence and you can replace it with any value of the same parity (pick an odd value if $a_i$ was odd, or even if even, this is for the division by 3 to still work). All $a_j$ with $j>i$ will stay valid, but you can't use the $a_j$ with $j<i$ anymore (unless you pick the right $a_i$, something like New $a_i=a_i+2k\cdot3^{i-1}$ I think, where the exponent of 3 is the number of previous $a_j$ you want to keep as-is. The reason for this is that the odd numbers you find behind $\frac{b\cdot2^{a_i+2m}-1}{3}$ are cycling through {$0,1,2$} modulo $3$ as $m$ increase, and this for each $a_j$ you want to keep as-is)

Collag3n
  • 2,556
  • I'm sorry to write you here. But I don't know any other way to contact you. Could you please look at this question? – DaBler Mar 03 '23 at 14:21
  • Sorry, although I know it can shed some light on the 3x+1 problem, I never explored any ax+b variant. Obviously as for any 3x+y variant you'll have the trivial cycle 4y,2y,1y, but the path and the 2-valuation of the numbers are too different between 3x+1, 3x+3, 3x+9,... to find a common ground in a short time. – Collag3n Mar 03 '23 at 19:03
1

If you write your sequence of $a_k$ as "Key" for the finding of $b_0 \underset{\text{Key}}\to b_{N}$ (let $N$ denote the number of odd steps, and $S$ the number of even steps ( = your $k_o$ and $k_e$)), then the following functions in Pari/GP give you allowed $b_0$,$b_N$

\\ finds (integer or rational) bN from T(b0,Key)
T(b=1,Key=[1])= for(k=1,#Key,b=(3*b+1)/2^Key[k]); b

\ finds values b_0,b_N for given Key by b_N=T(b_0,[a1,a2,a3,...aN])
\ if idx==0, this values, if idx<>0 the idx'th possible next values {TFind_ab(Key=[1],idx=0)=my(t0,d,e,w,b0,bN,S,N); N=#Key; S=vecsum(Key); t0=T(0,Key);d=denominator(t0);e=numerator(t0); w= - e/3^N % d; b0 = w; if( T(b0,Key ) % 2==0, b0 +=d ); bN=(b03^N + e)/d + idx23^N;
b0= b0 + idx
2*2^S; return([b0,bN]) }

This gives for instance for "key" $Key=[2,1]$ the values $[b_0,b_N]$

Key=[2,1]        \\ %43 = [2, 1]
--- ----------------------------
TFind_ab(Key)    \\ %45 = [9, 11]
TFind_ab(Key,1)  \\ %47 = [25, 29]
TFind_ab(Key,2)  \\ %49 = [41, 47]
TFind_ab(Key,-1) \\ %51 = [-7, -7]

and some small modifications:

TFind_ab([3,1]) \\ %53 = [29, 17]
TFind_ab([4,1]) \\ %57 = [37, 11]
TFind_ab([5,1]) \\ %59 = [117, 17]

TFind_ab([3,2]) \ %67 = [45, 13] TFind_ab([4,2]) \ %69 = [5, 1] TFind_ab([5,2]) \ %71 = [181, 13]

Here is some longer "Key"; and the examples show the stepping of $2$ in the first element keeps the resulting number equal:

TFind_ab([2,3,2,1]) \\  %412 = [145, 47]
TFind_ab([4,3,2,1]) \\  %414 = [581, 47]
TFind_ab([6,3,2,1]) \\  %416 = [2325, 47]
 .... 
TFind_ab([1,3,2,1]) \\  %418 = [243, 155]
TFind_ab([3,3,2,1]) \\  %420 = [973, 155]
TFind_ab([5,3,2,1]) \\  %422 = [3893, 155]
 ....

Another example, longer key:

TFind_ab([1,2,3,4,5,6,7,8,9,10]) \\ [ 71838549286572043, 117739]
TFind_ab([3,2,3,4,5,6,7,8,9,10]) \\ [287354197146288173, 117739]
 ...
  • For Key=[2,1] shouldn't you find [1,2] as first [$b_1$,$b_n$] ? – Collag3n Mar 02 '23 at 17:18
  • @Collag3n - first: plz excuse, I've been sloppy with the notation (index) for the leading number in a transformation; I've written $b_1$ and then $b_N$. It should either be $b_0 \underset{\text{Key}}\to b_N$ or $b_1 \underset{\text{Key}}\to b_{N+1}$. I took now the first of the two variants. - second: no, the functions are constructed to fulfill the assumption that $b_0$ and $b_N$ are both odd numbers. – Gottfried Helms Mar 02 '23 at 17:28
  • 1
    Arf...no, you are right. I am used to include even numbers when dealing with parity vectors and other sequences . OP is indeed talking about "next odd elements" – Collag3n Mar 02 '23 at 18:06
  • 1
    And like mentioned in my answer, you can also play with any $a_i$ while keeping the other $a_j$ as they are: TFind_ab([1,2,3,4,5+2*3^4,6,7,8,9,10]) \ [419968629623207268479543176277853983390749421444842284937492844555, 117739] or TFind_ab([1,2,3+2*3^2,4,5,6,7,8,9,10]) \ [18832044664179141863499, 117739] – Collag3n Mar 02 '23 at 22:01
  • @Collag3n - A nice game I've once played with is that of constructing a glide. Construct a key from the beginning $[1]$, then $[1,2]$, then $[1,2,1]$, ... such that $b_0 \to b_N$ is the least increasing step then you construct a "glide" (Roosendaal) of arbitrary length. (however no "glide-record"). The pattern of $1$ and $2$ in the key gives an interesting (infinite!) sequence. Example the "Key" of length $12$ (12 odd steps): $[1,2,1,2,1,2,2,1,2,1,2,2]$. Each leading subkey defines a glide $b_N>b_0$ ... – Gottfried Helms Mar 03 '23 at 07:21
  • 1
    (...cntd...) The sequence is in OEIS (https://oeis.org/A022921) . If you compress this sequence by $1,2 \to a$ and $1,2,2 \to b$ then the sequence of $a,b,...$ has a similar pattern, where you can compress $a,a,b \to c$ and $a,b \to d$ and so on recursively. If I recall corectly this (I think the length of the symbols $a$,$c$,$e$,...) is related to the convergents of the continued fraction of $\log_3(2)$ (Sorry have it not more precisely at hand, its a long time ago I fiddled with this...) – Gottfried Helms Mar 03 '23 at 08:08
  • 1
    Yes, Terras also explored that. And so did I. The sum from 1 to $i$ is the classical $\lfloor i\cdot \log_2(3)\rfloor$, and you'll find a second occurence of "2" every $\lfloor \lceil {i\log_{\frac{9}{8}}(\frac{4}{3})}\rceil\log_{\frac{4}{3}}(2)\rfloor$ – Collag3n Mar 03 '23 at 08:28
  • 1
    Then you might be interested in that same sequence: seq(i)=n=4^i+1;for(j=1,i,print1(#binary(3n+1)-#binary(n)," ");n=(3n+1)/4) where each {1,2} element is the binary length change of an odd element $n$ of the sequence starting from $4^i+1$ and the application of the collatz function $3n+1$ on it – Collag3n Mar 03 '23 at 08:34
  • 1
    And you should give a try to a starting value $2^i-1$ instead of $4^i+1$ too – Collag3n Mar 03 '23 at 08:36
  • I did not try the compression technique, but I remember that if you start anywhere in the sequence and sum all elements up to some length, it will not differ from the sum (on the same length) starting from the first element by more than 1. But to be checked, I usually work with the same sequence starting with "2" and not "1" – Collag3n Mar 03 '23 at 08:42
  • 1
    And if you look at the binary length change (n->3n+1) for any sequence, you'll get that kind of sequences too (no two consecutive "1" and no 3 consecutive "2") – Collag3n Mar 03 '23 at 08:46
  • 1
    Maybe I'm wrong but it should be too $b_N>\frac{(b_0+1)\cdot 3^N-2^N}{2^S}$ – user140242 Mar 03 '23 at 09:26
  • @Collag3n - on the compression ... Perhaps a picture says it with no words... https://i.stack.imgur.com/aVFQU.png – Gottfried Helms Mar 03 '23 at 09:29
  • 1
    Now that you mention it, I think I explored that too sort of. If I remember correctly, the sequence from 1 to i, where i is in the continued fraction of log_2(3) (1,2,7,12,53,... and 1,3,5,17,29,41,...) is a palindrome (except for the last element which can differ for half of the elements of the cfr) – Collag3n Mar 03 '23 at 09:39
  • In place of the function you are using, you can also use the the formula $b_N=\frac{3^N \cdot b_0+b}{2^S}$ with $b = 3^{N-1}+\sum_{i=0}^{N-2} {3^{i} \cdot 2^{\left(\sum_{j=1}^{N-1-i} {a_{j}}\right)}}. \quad $ Example "Key": $[2,3,2,1] $ you have $47=\frac{3^4 \cdot 145+287}{2^8}$ – user140242 Mar 03 '23 at 17:48
  • @user140242 - very nice ;-) but what do you think the function t(b0,Key)is doing ? – Gottfried Helms Mar 03 '23 at 18:21
  • @GottfriedHelms I meant to not repeat the t() function once $N$, $S$ and $b$ have been found for a fixed "Key", just see for which values ​​of $b_0$ the formula returns an integer – user140242 Mar 03 '23 at 18:27
  • @GottfriedHelms Ok, I don't know Pari/GP well, I didn't quite understand how the function worked – user140242 Mar 03 '23 at 19:09
  • @user140242 - oh well, I see. Foreing programming language is (today) as well a difficult thing for me... Well, I could have written the function `T()`` as a iterative sum-formula, but I think everything is easy enough to see, that it is just doing what your consideration expects... But of course: it must be rewritable in the sum-form given by you. Luckily Pari/GP allows a bit of symbolic algebra. If one inserts the token "a1","a2" etc instead of "Key[k]" then Pari/GP would give you just your sum-formula. – Gottfried Helms Mar 03 '23 at 19:16