#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int eps=1e-6; 
const int maxn=65538;
const int  N=3e4+10;
const int inf=0x3f3f3f3f;
//int a[N], b[N], c[N], d[N];
int a[100],n;
int main(){
	int t; scanf("%d",&t);
	while(t--){
		int ans=0;
		scanf("%d",&n);
		for(int i=1;i<=n;i++) scanf("%d",&a[i]);
		for(int i=1;i<n;i++)
		{
			int m=max(a[i],a[i+1]),m1=min(a[i],a[i+1]);
			while(m>2*m1)
			{
				m1<<=1;
				ans++;
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}