Time complexity for this simple loop This is the code:

j=2
while j&lt;(n*n)
     j=j*j




At first my approach was to treat this like this loop

i=1
while (i&lt;n)
    i=i*2


Which generates on $i$ various powers of $2$  ($i=2^0, 2^1, 2^2....2^k$).

At a certain $k$ iteration, $i$ is equal to or exceeds $n$. 
So $2^k=n$ is the time when the while stops. 

We find $k=log_2(n)$ which is the number of times the entire while loop has been executed, so $T(n)=\theta(log_2n)$.



So my idea for the first algorithm was this:
j=j*j generates on $j$ different powers of himself, so you can describe it as $j^2$. The problem is that I can't shove in a $k$ iterations in the counting.

The solution for this is actually $log(log(n))$.

Why is this? Can I improve my logic?
You're on the right track.  For the simpler code, you correctly wrote down the sequence of values that are produced: $2^0,2^1,2^2,\dots$.  In particular, the $t$th output is $2^t$.  Then you were able to find where the loop stops by setting $2^t=n$ and solving for $t$.  That's a great approach.

Try doing the same thing for your actual example.  Hint: the first two outputs are $j$ and $j^2$.  What's next?  Can you generalize What is the $t$th output?  Can you write an equation that represents where the loop stops and solve for $t$?