#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000001];
int kac[1000001];
int t[1000001];
int p[1000001];
int sum(int i) {
  int s = 0;
  for (; i; i -= i & -i) s += t[i];
  return s;
}
void add(int i, int v) {
  for (; i < 1000001; i += i & -i) t[i] += v;
}
int getata(int x, int k) { return (x + k - 2) / k; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], p[i] = i;
  sort(p + 1, p + n + 1, [](int i, int j) { return a[i] < a[j]; });
  for (int i = 1, j = 1; i <= n; i = j) {
    while (j <= n && a[p[i]] == a[p[j]]) ++j;
    for (int l = i; l < j; ++l) {
      int v = p[l];
      for (int k = 1; k * (v - 1) + 2 <= n && k <= n - 1; ++k) {
        kac[k] += sum(min(n, k * v + 1)) - sum(k * (v - 1) + 1);
      }
    }
    for (int l = i; l < j; ++l) add(p[l], 1);
  }
  for (int k = 1; k < n; k++) {
    long long res = kac[k];
    cout << res << " ";
  }
  cout << endl;
  return 0;
}
