#include <iostream>
using namespace std;
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))  
#define REVERSE(v) reverse(ALL(v))
#define F first
#define S second
#define ppb pop_back
 
////-------------------------------------------------------------------------
#define ld long double 
////define ll long long
////--------------------------------------------------------------------------
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
 
typedef map<char,int> mci;
struct qn{
	int x;
	int y;
//	string s;	
};
 	
int main() {
    ll t;
	cin>>t;
	while(t--){
		ll n,k,p=0,ans=0;
	    cin>>n;
	    ll a[n];
	    for(ll i=0;i<n;i++)
	    cin>>a[i];
	    ll c=0;
	    for(ll i=0;i<n-1;i++){
	    	if(2*min(a[i],a[i+1])<max(a[i],a[i+1])){
	    		ll mx=max(a[i],a[i+1]),mn=min(a[i],a[i+1]);
	    		while(ceil(mx*1.0/2.0)>mn){
	    			mx=ceil(mx*1.0/2.0);
	    			c++;
				}
			}
		}
		cout<<c<<endl;
	}
}
