#include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define int long long 
#define ff first
#define ss second
#define vi vector<int>
#define pi pair<int,int>
#define pb push_back
#define IM LLONG_MAX
#define endl "\n"
#define all(v) v.begin(),v.end()
#define REP(i,n) for(int i=0;i<n;i++)
#define out(a) for(auto x:a)cout<<x<<" "; cout<<endl;
#define mod 1000000007
using namespace std; 


void AKM() 
{
    int n;
    cin>>n;
    vi a(n);
    REP(i,n){
        cin>>a[i];
    }
    int c=0;
    for(int i=0;i<n-1;i++){
        int x=min(a[i],a[i+1]);
        int y=max(a[i],a[i+1]);
        while(2*x < y){
            x*=2;
            c++;
        }
    }
    cout<<c<<endl;
    
}
    
int32_t main()
{
    fastio;
    cout<<fixed;
    cout.precision(15);
    int __TESTCASES=1;
    cin>>__TESTCASES;
    while(__TESTCASES--){ 
    AKM();  
}
}