Expression for the highest power of 2 dividing $3^a\left(2b-1\right)-1$ 
Question: I am wondering if an expression exists for the highest power of 2 that divides $3^a\left(2b-1\right)-1$, in terms of $a$ and $b$, or perhaps a more general expression for the highest power of 2 dividing some even $n$?

EDIT: This is equivalent to finding an expression for the highest power of 2 dividing some even $n$, however finding it in terms of $a$ and $b$ may make it more useful for what I have described below.

Motivation For Asking:

The reason for this particular question is because, having had a look at the Collatz conjecture, I have found that positive odd integers $n$ of the form $2^a\cdot\left(2b-1\right)-1$ will iterate to the even value of $3^a\cdot\left(2b-1\right)-1$ after $a$ iterations of $\frac{3n-1}{2}$, then being divided by the highest power of 2 dividing it. Since I have also found that numbers of the form ${\left(\frac{2}{3}\right)}^c\cdot\left(2^{3^{c-1}\cdot(2d-1)}+1\right)-1$ become powers of 2 after $c$ iterations, I am hoping to find an expression for the number of iterations for $n$ to become a power of 2, and hence reach the 4-2-1 loop.

Updates:

EDIT 1: I have found a post on mathoverflow at https://mathoverflow.net/questions/29828/greatest-power-of-two-dividing-an-integer giving a rather long expression for the highest power of 2 dividing any odd positive integer $n$ which may be useful.

EDIT 2: Here is an image displaying patterns I find quite interesting. It is from a program I wrote which displays the exponent of the highest power of 2 dividing each value of $3^a\left(2b-1\right)-1$, represented by lighter pixels for higher values and darker pixels for lower values. It is plotted on a 2d grid such that each pixel on the x-axis represents the $b$ value, starting from one, and the same for $a$ on the y-axis:

This seems to suggest that if $a$ and $b$ are both either odd or even, the highest power of 2 dividing $3^a\left(2b-1\right)-1$ is 2 (I am currently having a look at this further).

EDIT 3: Defining $2^{b_s}$ as the highest power of 2 dividing $1.5^{a_s}(n_{s}+1)-1$, I know that any odd $n_s=2^{a_s}(2x_s-1)-1$ will reach:
$$n_{s+1}=2^{a_{s+1}}(2x_{s+1}-1)-1=\frac{3^{a_s}(2x_s-1)-1}{2^{b_s}}=\frac{1.5^{a_s}(n_{s}+1)-1}{2^{b_s}}$$
This has led me to find an expression for the $z$th iteration, $T_z(n_1)$, starting from some odd $n_1$, of:
$$T(n_s)=\frac{1.5^{a_s}\left(n_s+1\right)-1}{2^{b_s}}=n_{s+1}$$
The expression I found is as follows:
$$T_z(n_1)=\frac{1.5^{\sum_{c=2}^{z}a_c}\left(1.5^{a_1}\left(n_1+1\right)-1\right)}{2^{\sum_{d=1}^{z}b_d}}+\frac{1.5^{a_z}-1}{2^{b_z}}+\sum_{e=2}^{z-1}\frac{1.5^{\sum_{f=e+1}^{z}a_f}\left(1.5^{a_e}-1\right)}{2^{\sum_{g=e}^{z}b_g}}$$
Hence, for the Collatz conjecture to be true:
$$T_z(n_1)=\frac{1.5^{\sum_{c=2}^{z}a_c}\left(1.5^{a_1}\left(n_1+1\right)-1\right)}{2^{\sum_{d=1}^{z}b_d}}+\frac{1.5^{a_z}-1}{2^{b_z}}+\sum_{e=2}^{z-1}\frac{1.5^{\sum_{f=e+1}^{z}a_f}\left(1.5^{a_e}-1\right)}{2^{\sum_{g=e}^{z}b_g}}=1$$ 
must have a unique solution for any odd $n_1$ such that $\left\{z,a_{1...z},b_{1...z}\in\mathbb{N^+}\right\}$
This raises a separate question - namely what can be said of $a_{s+1}$ and $b_{s+1}$ from the values of $a_{s}$ and $b_{s}$? If there turns out to be some connection, the values of $\sum_{i=1}^{z}a_{i}$ and $\sum_{i=1}^{z}b_{i}$ may be expressed simply in terms of $a_1$ and $b_1$, hence turning the problem into a (diophantine equation? I have not yet studied Mathematics beyond secondary school, so I am unsure of correct Mathematical terminology or notation - please feel free to correct me).

EDIT 4: As suggested by Gottfried Helms, when $3^a\left(2b-1\right)-1$ is written as $3^ab-\left(3^a+1\right)$, factoring out the highest power of 2 shows that for $a \equiv b \pmod 2$, the highest power of 2 dividing $3^a\left(2b-1\right)-1$ is 2, and for $a \equiv 1 \pmod 2$ where $b \equiv 0 \pmod 4$, or $a \equiv 0 \pmod 2$ where $b \equiv 3 \pmod 4$ it must be 4. In other cases it seems to be no longer dependant on $a$ or $b$ and becomes pseudo-random. This helps to explain the patterns found above, but not all of them.


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.
