Formula to describe this sequence I have a pattern of sequences that I want to define.
The first sequence is $2$.  In the next sequence you double that to get $4$, put $6$, and then put $4$ again.  In the third sequence you double the previous sequence to get $8,12,8$, write $6$, then write $8,12,8$.  This pattern continues, doubling the last sequence, writing $6$, then rewriting the the first set of numbers, so we would have
$$2\\4,6,4\\8,12,8,6,8,12,8\\16,24,16,12,16,24,16,6,16,24,16,12,16,24,16$$
Is there a closed formula to represent the $k$th number in the $n$th row?
I also would like to know this answer when we start with $6$ as the first number so we have
$$6\\12,6,12\\24,12,24,6,24,12,24\\48,24,48,12,48,24,48,6,48,24,48,12,48,24,48$$
NOTE:  I slightly edited my main question seconds before String answered, so his answer doesn't exactly reflect my question.  I'm still looking for a better solution.
 A: One can show that the $n$-th row has $2^n-1$ elements. So $N$ rows cover
$$
T_N=\sum_{n=1}^{N}(2^n-1)=2^{N+1}-N-2
$$
elements of the sequence. Thus the $k$-th element is found in the $n_k$-th row where
$$
n_k=\min\{N:k\leq T_N\}
$$
Define $i_k:=k-T_{(n_k-1)}$ as the position of the $k$-th element in the $n_k$-th row. A quick observation is that all elements at an odd position in a given row are the same. They stem from the seed at the top of the sequence, so they are either based on $2$ or $6$ and has since been doubled $n_k-1$ times.

Note how the $6$ in the middle of the $(s+1)$-th row is placed at the position $2^s$, and due to the pattern of copying we see that the resulting figures of magnitude $6\cdot 2^{n-s-1}$ in the following rows (for $n>s+1$) are placed at positions that are odd multiples of $2^s$.
Thus, to trace backwards to the original $6$ from which a given figure $6\cdot 2^{n-s-1}$ was seeded we simply divide it's position by $2$ as many times as possible an record the number of times as $s$. Then the number originated from row $(s+1)$.

In this way this answer provides an algorithm, though not a closed form formula, to compute any given element of the two sequences. One could even switch to different seeds than $2$ or $6$. I will add some detail an give an example of the algorithm soon.

Here is a sample of the table of $T_N$-values.
$$
\begin{array}{|c|c|c|}
\hline
N&T_N&2^{N+1}-N-2\\
\hline
1&1&4-1-2\\
2&4&8-2-2\\
3&11&16-3-2\\
4&26&32-4-2\\
\vdots&\vdots&\vdots\\
15&65519&65536-15-2\\
16&131054&131072-16-2\\
\hline
\end{array}
$$
So for instance if we were to determine the $70007$-th element, $a_{70007}$, (which will be identical for the two sequences you gave) we see that $n_k=16$ and
$$
\begin{align}
i_{70007}&=70007-T_{15}\\
&=70007-65519\\
&=4488\\
&=8\times 561
\end{align}
$$
showing us that $s=3$ since $2^3=8$ is the largest power of $2$ dividing $i_k$. Thus this figure was seeded as a $6$ in row $(s+1)=4$ and doubled $16-4=12$ times after that. Therefore it must be
$$
a_{70007}=6\cdot 2^{12}=24576
$$
I verified this result writing a little program computing the first 16 rows of the sequence.

To add a smaller example that can actually be verified from the lists you gave, we see that the $16$-th element, $a_{16}$, must be found in the $4$-th row and that $i_{16}=16-T_3=5$. Since this figure is odd, it stems from the top seed, so it will either be
$$
a_{16}=2\cdot 2^3=16
$$
if the top seed was $2$ or
$$
a_{16}=6\cdot 2^3=48
$$
if the top seed was $6$. This is readily verified from your lists.
