#include <bits/stdc++.h>
using namespace std;
int n;
int a[200500];
vector<int> st[400500];
int count_less(const vector<int> &v, int than) {
  return lower_bound((v).begin(), (v).end(), than) - v.begin();
}
int count_less(int x, int y, int than) {
  int cnt = 0;
  for (x += n, y += n; x <= y; x = (x + 1) / 2, y = (y - 1) / 2) {
    if (x & 1) cnt += count_less(st[x], than);
    if (~y & 1) cnt += count_less(st[y], than);
  }
  return cnt;
}
pair<int, int> pairs[200010];
int main() {
  scanf("%d", &n);
  for (int i(0), _B_i(n); i < _B_i; ++i)
    scanf("%d", a + i), pairs[i].first = a[i], pairs[i].second = i;
  sort(pairs, pairs + n);
  for (int i = 0; i < n; ++i)
    for (int j = pairs[i].second + n; j; j /= 2)
      st[j].push_back(pairs[i].first);
  vector<int> res(n - 1);
  for (int k(1), _B_k(n); k < _B_k; ++k) {
    int m = (n - 2) / k + 1;
    for (int i(0), _B_i(m); i < _B_i; ++i) {
      int lo = i * k + 1;
      int hi = min(lo + k, n);
      res[k - 1] += count_less(lo, hi - 1, a[i]);
    }
  }
  for (int c : res) printf("%d ", c);
  puts("");
  return 0;
}
