Expression for the highest power of 2 dividing $3^a\left(2b-1\right)-1$

This is only a reply to Daniel's comment but too long for the box

Legend: In the following I mean

  • $ \{expression,p \} $ the exponent to which primefactor $p$ occurs in $expression$
  • $[ m : a ]$ equals $1$ if $a$ divides $m$ otherwise it equals $0$


By analysis of cyclicitiness due to "little Fermat" of exponents of primefactor $2$ :
  • (1) given $\qquad \displaystyle \{3^n-1,2\} = 1 + [n:2] + \{n,2\} $

Then in general

  • (2) because $ \qquad \displaystyle 3^n+1 = { 3^{2n}-1 \over 3^n-1} $

it follows

  • (3) $ \displaystyle \qquad \qquad \{3^n+1,2\} = \{3^{2n}-1,2\} - \{3^{n}-1,2\} $

Algebraical reformulation of (3) using (1) and (2):

$ \displaystyle \qquad \{3^n+1,2\} \;= \left(1 + [2n:2] + \{2n,2\}\right) - \left(1 + [n:2] + \{n,2\}\right) \\ \qquad \qquad \qquad \quad = \left([2n:2] + \{2n,2\} \right) - \left([n:2] + \{n,2\} \right) \\ \qquad \qquad \qquad \quad = \left(1 + 1+\{n,2\}\right) - \left([n:2] + \{n,2\}\right) \\ \qquad \qquad \qquad \quad = 2 - [n:2] $

Result:

  • (4) $ \displaystyle \qquad \implies \{3^n+1 ,2 \} = 2 - [n:2] $

which agrees with your formulation in your comment.


After substituting different integers for $a$ and $b$, I came across a pattern I recognized from my personal research into the Collatz Conjecture. While I cannot guarantee or prove this pattern is consistent, this pattern may point the way to a better explanation or answer some of your questions.

The patterns I came across reference this sequence: 0,1,0,2,0,1,0,3,0,1,0,2,.... or $A007814$ in the OEIS. This pattern was found by recording the number of times you can divide each integer in the set of natural numbers by 2. This pattern pops up in the Hailstone sequences for 3x+1 as a result of the "if n is even, divide n by 2" rule.

I used an informal "brute force" method and collected some data for a few combinations for $a$ and $b$ into the formula $3^a(2b-1)-1$ and then recorded how many times 2 can be divided into the result. I recorded my results on this Google Doc.

The patterns reveal why using an odd $b$ and an odd $a$ (or an even $a$ and $b$) produce a result only divisible by 2 once: the values line up since the chance of a number being divisible by 2 is roughly 50% and for every value of $a$ the values seem to alternate, according to my results. As for the first question, this pattern builds on itself infinitely, so supposedly there are an infinite number of possible variable combinations to get the maximum value for $n$. As for simplifying this into an expression of some-sort, I don't know how to do that or where to start. While the patterns do seem to have somewhat of a regularity, the variables can vary the patterns quite a bit, so much a seemingly random $2^9$ can be thrown in for seemingly no reason.

Unfortunately, I am not a mathematician and do not have the proper training to know if I stated the obvious or not, or if I am of any use to answering your other questions. I am sorry if this response is not helpful, this is what I found and what I understand.

When I posted this, I only went up to $a = 4$, I will add more data to increase the sample size if needed.