#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double eps = 1e-9;
const double pi = acos(-1.0);
struct node {
  int sum;
  node *l, *r;
  node(int _sum) {
    sum = _sum;
    l = r = NULL;
  }
  node() {
    l = r = NULL;
    sum = 0;
  }
} * T[200200];
int n;
int a[200200];
int posa[200200];
int an;
node *build(int v, int tl, int tr) {
  if (tl == tr) return new node(0);
  int mid = (tl + tr) / 2;
  node *t = new node(0);
  t->l = build(2 * v, tl, mid);
  t->r = build(2 * v + 1, mid + 1, tr);
  return t;
}
node *update(node *&t, int tl, int tr, int pos, int val) {
  if (tl == tr) {
    return new node(t->sum + val);
  }
  node *T = new node(0);
  int mid = (tl + tr) / 2;
  if (pos <= mid) {
    T->l = update(t->l, tl, mid, pos, val);
    T->r = t->r;
  } else {
    T->r = update(t->r, mid + 1, tr, pos, val);
    T->l = t->l;
  }
  T->sum = T->l->sum + T->r->sum;
  return T;
}
int get(node *&A, node *&B, int tl, int tr, int k) {
  if (k < 0) return 0;
  if (tl == tr) return B->sum - A->sum;
  int mid = (tl + tr) / 2;
  if (k <= mid) {
    return get(A->l, B->l, tl, mid, k);
  } else
    return B->l->sum - A->l->sum + get(A->r, B->r, mid + 1, tr, k);
}
void process() {
  vector<int> v;
  for (int i = 1; i <= n; i++) v.push_back(a[i]);
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  for (int i = 1; i <= n; i++) {
    posa[i] = lower_bound(v.begin(), v.end(), a[i]) - v.begin();
  }
  an = (int)v.size();
  T[0] = build(1, 0, an - 1);
  for (int i = 1; i <= n; i++) {
    T[i] = update(T[i - 1], 0, an - 1, posa[i], 1);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  process();
  for (int k = 1; k <= n - 1; k++) {
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      int vl = k * (i - 1) + 2;
      int vr = k * i + 1;
      if (vl > n) break;
      int t = get(T[vl - 1], T[min(vr, n)], 0, an - 1, posa[i] - 1);
      ans += t;
      if (vr > n) break;
    }
    printf("%d ", ans);
  }
  return 0;
}
