#include <bits/stdc++.h>
using namespace std;
#define fop(i,a,b) for(int i = a;i < b;i++)
#define ll long long
#define pb push_back
#define ppb pop_back
#define pf push_front 
#define ppf pop_front
int main() {
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		float a[n];
		fop(i,0,n) cin >> a[i];
		int ans = 0;
		float d = 0;
		fop(i,0,n-1){
			d = max(a[i],a[i+1])/min(a[i],a[i+1]);
			//cout << d << " ";
			while(d > 2){
				ans++;
				d /= 2;
			}
		}
		cout << ans << endl;
	}
	return 0;
}