#include <bits/stdc++.h>
inline void scanint(int &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
int cmp_double(double a, double b, double eps = 1e-9) {
  return a + eps > b ? b + eps > a ? 0 : 1 : -1;
}
using namespace std;
const int INF = 0x3F3F3F3F;
const int NEGINF = 0xC0C0C0C0;
struct bit {
  vector<int> v;
  int maxVal;
  bit(int N) {
    v.assign(N + 2, 0);
    maxVal = N + 1;
  }
  int read(int idx) {
    idx++;
    int sum = 0;
    while (idx > 0) {
      sum += v[idx];
      idx -= (idx & -idx);
    }
    return sum;
  }
  void update(int idx, int val) {
    idx++;
    while (idx <= maxVal) {
      v[idx] += val;
      idx += (idx & -idx);
    }
  }
};
void gen_queries(
    int N, vector<pair<int, int>> &vet,
    vector<pair<pair<int, pair<int, int>>, pair<int, int>>> &vetQ) {
  for (__typeof__(1) i = (1); i < (N); ++i) {
    int st = 1;
    int fn = st + (i - 1);
    fn = min(st + (i - 1), N - 1);
    for (__typeof__(0) k = (0); k < (N); ++k) {
      vetQ.push_back(make_pair(make_pair(vet[k].first, make_pair(k, i)),
                               make_pair(st, fn)));
      st = fn + 1;
      fn = min(st + (i - 1), N - 1);
      if (st >= N) break;
    }
  }
  sort(vetQ.begin(), vetQ.end());
}
int main() {
  int N;
  cin >> N;
  vector<pair<int, int>> vet;
  vector<vector<int>> appears(N);
  unordered_map<int, int> mapa;
  int HASH = 0;
  for (__typeof__(0) i = (0); i < (N); ++i) {
    int v;
    scanf(" %d", &v);
    vet.push_back(make_pair(v, i));
  }
  vector<pair<pair<int, pair<int, int>>, pair<int, int>>> vetQ;
  gen_queries(N, vet, vetQ);
  sort(vet.begin(), vet.end());
  for (__typeof__(0) i = (0); i < (N); ++i) {
    if (mapa.find(vet[i].first) == mapa.end()) {
      mapa[vet[i].first] = HASH++;
    }
    appears[mapa[vet[i].first]].push_back(vet[i].second);
  }
  bit B(N);
  vector<int> ans(N, 0);
  int sz = vetQ.size();
  int menor = 0;
  for (__typeof__(0) i = (0); i < (sz); ++i) {
    int prevK = mapa[vetQ[i].first.first];
    if (prevK > menor) {
      for (__typeof__(menor) j = (menor); j < (prevK); ++j) {
        int sz2 = appears[j].size();
        for (__typeof__(0) z = (0); z < (sz2); ++z) B.update(appears[j][z], 1);
      }
    }
    menor = prevK;
    for (__typeof__(i) j = (i); j < (sz); ++j) {
      int curK = mapa[vetQ[j].first.first];
      if (prevK != curK) {
        for (__typeof__(prevK) z = (prevK); z < (curK); ++z) {
          int sz2 = appears[z].size();
          for (__typeof__(0) w = (0); w < (sz2); ++w)
            B.update(appears[z][w], 1);
        }
        menor = curK;
        i = j - 1;
        break;
      }
      int st = vetQ[j].second.first;
      int fn = vetQ[j].second.second;
      ans[vetQ[j].first.second.second] += B.read(fn) - B.read(st - 1);
      i++;
    }
  }
  for (__typeof__(1) i = (1); i < (N); ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
