#include<bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
// using namespace std;

#define ff              first
#define ss              second
#define ll             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rep(i,a,b)          for(ll i = a; i < b; ++i)
void c_p_c()
{
#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("output2.txt", "w", stdout);
#endif
}
ll flag[1000000] = {0};
void seive()
{
	// ll flag[1000000]={0};
	for (ll i = 2; i < 100000; i++)
	{
		if (flag[i] == 0)
		{
			for (ll j = i * i; j < 1000000; j = j + i)
			{
				flag[j] = 1;

			}
		}
	}
	flag[1] = 1;
	flag[0] = 1;
}
bool check_perfect_square(ll n) {
	double sqrt_n = sqrt(n);
	if (sqrt_n == int(sqrt_n)) {
		return true;
	}
	else {
		return false;
	}
}
// }
// ll solve(ll a, ll b)
// {

// 	if (a == 0)
// 	{
// 		return 0;
// 	}
// 	if (b == 1)
// 	{
// 		ll s = solve(a, b + 1);
// 		return s;
// 	}
// 	else {
// 		ll op1 = solve(a / 2, b);
// 		ll op2 = solve(a, b + 1);
// 		return min(op1, op2);
// 	}

// }

int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	c_p_c();
	w(t)
	{
		ll n, arr[100000];
		cin >> n;
		rep(i, 0, n)
		{
			cin >> arr[i];
		}
		ll c = 0;
		rep(i, 0, n - 1)
		{
			ll m1 = max(arr[i], arr[i + 1]);
			ll m2 = min(arr[i], arr[i + 1]);
			while (m2 * 2 < m1)
			{
				c++;
				m2 = m2 * 2;
			}
		}
		cout << c << endl;
	}
}

