#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n;
int ans[maxn];
int tree[maxn];
struct node {
  int val;
  int id;
  bool friend operator<(const node u, const node v) {
    if (u.val == v.val) return u.id < v.id;
    return u.val < v.val;
  }
} p[maxn];
int lowbit(int k) { return k & (-k); }
void add(int x) {
  if (x == 0) return;
  while (x < n) {
    tree[x] += 1;
    x += lowbit(x);
  }
}
int get_sum(int x) {
  int ans = 0;
  while (x) {
    ans += tree[x];
    x -= lowbit(x);
  }
  return ans;
}
void solve() {
  for (int i = 0; i < n; i++) {
    int id = p[i].id;
    for (int k = 1; k < n && k * id + 1 < n; k++) {
      ans[k] += get_sum(min(n - 1, k * id + k)) - get_sum(k * id);
    }
    add(p[i].id);
  }
  for (int i = 1; i <= n - 1; i++) {
    cout << ans[i] << " ";
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].val;
    p[i].id = i;
  }
  sort(p, p + n);
  solve();
}
