#include <bits/stdc++.h>
using namespace std;
const int M = 1 << 18;
int tree[2 * M];
const int MAXN = 200009;
pair<int, int> A[MAXN];
int results[MAXN];
void insert(int i, int x) {
  i += M;
  tree[i] = x;
  while (i != 1) {
    i /= 2;
    tree[i] = tree[2 * i] + tree[2 * i + 1];
  }
}
int query(int a, int b) {
  a += M;
  b += M;
  int res = tree[a];
  if (a != b) res += tree[b];
  while (a / 2 != b / 2) {
    if (a % 2 == 0) res += tree[a + 1];
    if (b % 2 == 1) res += tree[b - 1];
    a /= 2;
    b /= 2;
  }
  return res;
}
void go(int n) {
  for (size_t i = 0; i < n; i++) {
    int k = 1;
    int v = A[i].first;
    int j = A[i].second + 1;
    while (k * (j - 1) + 2 <= n && (j != 1 || k * j + 1 <= n)) {
      int a = k * (j - 1) + 2;
      int b = min(n, k * j + 1);
      results[k] += query(a, b);
      ++k;
    }
    insert(j, 1);
  }
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(0);
  int n, x;
  cin >> n;
  for (size_t i = 0; i < n; i++) {
    cin >> x;
    A[i].first = x;
    A[i].second = i;
  }
  sort(A, A + n, [](const pair<int, int> &a, const pair<int, int> &b) -> bool {
    if (a.first == b.first) return a.second < b.second;
    return a.first < b.first;
  });
  go(n);
  for (size_t i = 1; i < n; i++) cout << results[i] << " ";
  cout << endl;
  return 0;
}
