I suggest you an experimental approach, run the folllowing program and have a look at the output. It gives some insight and could make you able to understand the actual algorithm asymptotic behaviour.
using namespace std;
int main()
{
const int MAXN = 1000;
for (int n=1; n<MAXN; ++n)
{
int count = 0;
cout << "********************************\nn=" << n << "\n";
for (int i = 1; i <= n; i*=2)
for (int j = 1; j <= i * i; j++)
if (i % j == 0)
for (int k = 1; k <= j; k++)
{
cout << i << " " << j << " " << k << "\n";
++count;
}
cout << count << endl;
}
}