#include<bits/stdc++.h>
using namespace std;
#define ll long long int	
#define fr first
#define sc second
#define pb push_back
#define sz(c) c.size()
#define pu push
#define po pop
#define ins insert
#define srt(v)  sort(v.begin(),v.end())
#define rep(i, a, b) for (int i=a; i<b; i++)
#define rep2(i, a, b) for (int i=a; i>=b; i--)
#define mem0(a) memset(a,0,sizeof(a))
#define mem1(a) memset(a,1,sizeof(a))

int main(){
	int t;
	cin>>t;
	while(t--){
		int n;
		cin>>n;
		int a[n];
		rep(i,0,n)
		cin>>a[i];
		int ans=0;
		rep(i,0,n-1){
			int n1=max(a[i],a[i+1]);
			int n2=min(a[i],a[i+1]);
			while(ceil((n1*1.0)/n2)>2){
				ans++;
				n1=ceil((n1*1.0)/2);}
		}
		cout<<ans<<endl;
	}
}
