#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 100;
const int mod = (int)1e9 + 7;
const int P = mod;
inline int getint() {
  char _c = getchar();
  int _x = 0, _s = 1;
  while (_c <= 32) _c = getchar();
  if (_c == '-') _s = -1, _c = getchar();
  while ('0' <= _c && _c <= '9') _x = _x * 10 + _c - '0', _c = getchar();
  return _x * _s;
}
struct node {
  int sum;
  node *l, *r;
  node(int x) {
    sum = x;
    l = r = NULL;
  }
  node(node *_l, node *_r) {
    l = _l;
    r = _r;
    sum = (l ? l->sum : 0) + (r ? r->sum : 0);
  }
};
typedef node *pnode;
pnode build(int tl = 1, int tr = maxn) {
  if (tl == tr) return new node(0);
  int tm = (tl + tr) >> 1;
  return new node(build(tl, tm), build(tm + 1, tr));
}
int get(pnode t, int l, int r, int tl = 1, int tr = maxn) {
  if (!t || l > r || tr < l || tl > r) return 0;
  if (l <= tl && tr <= r) return t->sum;
  int tm = (tl + tr) >> 1;
  return get(t->l, l, r, tl, tm) + get(t->r, l, r, tm + 1, tr);
}
pnode upd(pnode t, int pos, int val, int tl = 1, int tr = maxn) {
  if (tl == tr)
    return new node(t->sum + val);
  else {
    int tm = (tl + tr) >> 1;
    if (pos <= tm)
      return new node(upd(t->l, pos, val, tl, tm), t->r);
    else
      return new node(t->l, upd(t->r, pos, val, tm + 1, tr));
  }
}
pnode root[maxn];
int n, a[maxn], b[maxn];
set<int> s;
map<int, int> id;
int get(int l, int r, int x) {
  return get(root[r], 1, x - 1) - get(root[l - 1], 1, x - 1);
}
int main() {
  root[0] = build();
  n = getint();
  for (int i = 1; i <= n; i++) {
    a[i] = getint();
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) {
    s.insert(b[i]);
    id[b[i]] = s.size();
  }
  for (int i = 1; i <= n; i++) {
    a[i] = id[a[i]];
    root[i] = upd(root[i - 1], a[i], 1);
  }
  for (int k = 1; k < n; k++) {
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      int l = k * (i - 1) + 2, r = min(k * i + 1, n);
      if (l > n) break;
      ans += get(l, r, a[i]);
    }
    cout << ans << " ";
  }
}
