#include <bits/stdc++.h>   using namespace std;   int n, m, cnt[200005 * 5], E2[200005], f[200005 * 5];   signed main() {     scanf( %d , &n);     int mx = 0;     for (int i = 1; i <= n; i++) {       int x;       scanf( %d , &x);       cnt[x]++;       mx = max(mx, x);     }     E2[0] = 1;     for (int i = 1; i < 200005; i++) E2[i] = E2[i - 1] * 2 % 1000000007;     for (int i = mx; i >= 2; i--) {       int tot = 0;       for (int j = i; j <= mx; j += i) tot += cnt[j];       f[i] = 1ll * tot * E2[tot - 1] % 1000000007;       for (int j = i + i; j <= mx; j += i)         f[i] = (f[i] - f[j] + 1000000007) % 1000000007;     }     int ans = 0;     for (int i = 2; i <= mx; i++)       ans = (ans + 1ll * f[i] * i % 1000000007) % 1000000007;     printf( %d n , ans);     return 0;   }   