#include <bits/stdc++.h>
using namespace std;
vector<int> tree[1000000];
int a[1000000];
int ans[1000000];
int n, sz;
void merg(int v, int k1, int k2) {
  int t1 = 0;
  int t2 = 0;
  while (t1 < tree[k1].size() && t2 < tree[k2].size()) {
    if (tree[k1][t1] < tree[k2][t2]) {
      tree[v].push_back(tree[k1][t1]);
      t1++;
    } else {
      tree[v].push_back(tree[k2][t2]);
      t2++;
    }
  }
  while (t1 < tree[k1].size()) {
    tree[v].push_back(tree[k1][t1]);
    t1++;
  }
  while (t2 < tree[k2].size()) {
    tree[v].push_back(tree[k2][t2]);
    t2++;
  }
}
void make(int v, int l, int r) {
  if (l == r) {
    tree[v].push_back(a[l]);
    return;
  }
  int u = (l + r) / 2;
  make(v + v, l, u);
  make(v + v + 1, u + 1, r);
  merg(v, v + v, v + v + 1);
}
int get(int v, int l, int r, int ll, int rr, int x) {
  if (l > rr || r < ll) return 0;
  if (l >= ll && r <= rr) {
    vector<int>::iterator it = lower_bound(tree[v].begin(), tree[v].end(), x);
    return it - tree[v].begin();
  }
  int u = (l + r) / 2;
  return get(v + v, l, u, ll, rr, x) + get(v + v + 1, u + 1, r, ll, rr, x);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sz = 1;
  while (sz < n) sz += sz;
  make(1, 1, sz);
  for (int i = 1; i <= n; i++) {
    for (int k = 1; k <= n; k++) {
      int ll = k * (i - 1) + 2;
      int rr = k * i + 1;
      if (ll > n) break;
      ans[k] += get(1, 1, sz, ll, min(n, rr), a[i]);
      if (i == 1 && rr > n) break;
    }
  }
  for (int i = 1; i < n; i++) cout << ans[i] << ' ';
}
