#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
void aryanc403() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
const long long int INF = 0xFFFFFFFFFFFFFFFL;
long long int seed;
mt19937 rng(seed = chrono::steady_clock::now().time_since_epoch().count());
inline long long int rnd(long long int l = 0, long long int r = INF) {
  return uniform_int_distribution<long long int>(l, r)(rng);
}
class CMP {
 public:
  bool operator()(pair<long long int, long long int> a,
                  pair<long long int, long long int> b) {
    return !(a.first < b.first || a.first == b.first && a.second <= b.second);
  }
};
void add(map<long long int, long long int> &m, long long int x,
         long long int cnt = 1) {
  auto jt = m.find(x);
  if (jt == m.end())
    m.insert({x, cnt});
  else
    jt->second += cnt;
}
void del(map<long long int, long long int> &m, long long int x,
         long long int cnt = 1) {
  auto jt = m.find(x);
  if (jt->second <= cnt)
    m.erase(jt);
  else
    jt->second -= cnt;
}
bool cmp(const pair<long long int, long long int> &a,
         const pair<long long int, long long int> &b) {
  return a.first < b.first || (a.first == b.first && a.second < b.second);
}
const long long int mod = 1000000007L;
const long long int maxN = 200000L;
struct node {
  long long int v;
  node *l, *r;
  node(long long int _v = 0) : v(_v), l(NULL), r(NULL){};
  node(node *id) : v(id->v), l(id->l), r(id->r){};
};
long long int T, n, i, j, k, in, cnt, l, r, u, v, x, y;
long long int m;
string s;
vector<long long int> a, b;
node *nd[maxN + 5];
node *add(node *id, long long int l, long long int r, long long int pos) {
  if (r < pos || pos < l) return id;
  if (id == NULL)
    id = new node();
  else
    id = new node(id);
  id->v++;
  if (l == r) return id;
  long long int m = (l + r) / 2;
  id->l = add(id->l, l, m, pos);
  id->r = add(id->r, m + 1, r, pos);
  return id;
}
long long int query(node *id, long long int l, long long int r,
                    long long int x) {
  if (x <= l || id == NULL) return 0;
  if (r < x) return id->v;
  long long int m = (l + r) / 2;
  return query(id->l, l, m, x) + query(id->r, m + 1, r, x);
}
long long int query(long long int l, long long int r, long long int x) {
  return query(nd[r], 1, (long long int)b.size() - 1, x) -
         query(nd[l - 1], 1, (long long int)b.size() - 1, x);
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  {
    cin >> n;
    a.clear();
    a.reserve(n + 1);
    a.push_back(-INF);
    for (i = 0; i < (n); ++i) {
      cin >> in;
      a.push_back(in);
    }
    b = a;
    b.push_back(INF);
    sort(b.begin(), b.end());
    b.resize(unique(b.begin(), b.end()) - b.begin());
    for (auto &x : a) x = lower_bound(b.begin(), b.end(), x) - b.begin();
    for (i = (1); i <= (n); ++i)
      nd[i] = add(nd[i - 1], 1, (long long int)b.size() - 1, a[i]);
    for (long long int k = 1; k < n; ++k) {
      long long int ans = 0;
      for (long long int j = 1; k * (j - 1) + 2 <= n; j++)
        ans += query(k * (j - 1) + 2, min(k * j + 1, n), a[j]);
      cout << ans << "\n";
    }
  }
  aryanc403();
  return 0;
}
