#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int INF = 1e9;
int n;
int a[N];
int d[N];
void read() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
}
void add(int l, int r) {
  d[l]++;
  d[r + 1]--;
}
vector<int> solve() {
  for (int i = 0; i <= n; i++) d[i] = 0;
  for (int i = 2; i <= n; i++) {
    int x = i - 2;
    int k = 1;
    for (;;) {
      int v = x / k;
      int last = n - 1;
      if (v != 0) last = x / v;
      assert(last >= k);
      if (a[v + 1] > a[i]) {
        add(k, last);
      }
      k = last + 1;
      if (k >= n) break;
    }
  }
  int sum = 0;
  vector<int> ans(n);
  for (int i = 1; i < n; i++) {
    sum += d[i];
    ans[i] = sum;
  }
  return ans;
}
void printAns(vector<int> ans) {
  for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  printf("\n");
}
vector<int> stupid() {
  vector<int> rr(n);
  for (int v = 1; v < n; v++) {
    for (int k = 1; k < n; k++) {
      int l = k * (v - 1) + 2;
      int r = k * v + 1;
      for (int j = l; j <= r; j++)
        if (j <= n && a[v] > a[j]) rr[k]++;
    }
  }
  return rr;
}
void stress() {
  for (int tt = 0;; tt++) {
    cerr << "test id: " << tt << endl;
    n = 200000;
    int T = 100;
    for (int i = 1; i <= n; i++) {
      a[i] = rand() % T;
    }
    auto r1 = solve();
    cerr << clock() * 1.0 / CLOCKS_PER_SEC << endl;
  }
}
int main() {
  if (1) {
    int k = 1;
    for (int tt = 0; tt < k; tt++) {
      read();
      printAns(solve());
    }
  } else {
    stress();
  }
  return 0;
}
