#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
inline int IN() {
  char ch = getchar();
  int f = 1, x = 0;
  while ((ch < '0' || ch > '9') && (ch != '-')) ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return x * f;
}
int n, w[N], rt[N], lc[N * 20], rc[N * 20], ww[N], cnt, tot, sm[N * 20];
void upd(int &x, int last, int l, int r, int v) {
  x = ++tot;
  lc[x] = lc[last];
  rc[x] = rc[last];
  sm[x] = sm[last];
  sm[x]++;
  if (l == r) return;
  int md = (l + r) >> 1;
  if (v <= md)
    upd(lc[x], lc[last], l, md, v);
  else
    upd(rc[x], rc[last], md + 1, r, v);
}
int ask(int x, int l, int r, int v) {
  if (!x || l == r) return 0;
  int md = (l + r) >> 1;
  if (v <= md)
    return ask(lc[x], l, md, v);
  else
    return sm[lc[x]] + ask(rc[x], md + 1, r, v);
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", w + i), ww[i] = w[i];
  sort(ww + 1, ww + n + 1);
  cnt = unique(ww + 1, ww + n + 1) - (ww + 1);
  for (int i = (1); i <= (n); i++)
    w[i] = lower_bound(ww + 1, ww + cnt + 1, w[i]) - ww;
  for (int i = (1); i <= (n); i++) upd(rt[i], rt[i - 1], 1, cnt, w[i]);
  for (int K = (1); K <= (n - 1); K++) {
    int ans = 0;
    for (int i = (1); i <= (n); i++) {
      int ls = K * i - K + 2, rs = K * i + 1;
      if (ls > n) break;
      if (rs > n) rs = n;
      ans += ask(rt[rs], 1, cnt, w[i]);
      ans -= ask(rt[ls - 1], 1, cnt, w[i]);
    }
    printf("%d ", ans);
  }
  return 0;
}
