#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int cnt[N], a[N], n, ans[N];
vector<int> ar[N];
void addv(int v, int u) {
  for (int i : ar[u]) ar[v].push_back(i);
}
void make(int v, int sl, int sr) {
  if (sr - sl == 1) {
    ar[v].push_back(a[sl]);
    return;
  }
  int med = (sl + sr) / 2;
  make(2 * v, sl, med);
  make(2 * v + 1, med, sr);
  addv(v, 2 * v);
  addv(v, 2 * v + 1);
  sort(ar[v].begin(), ar[v].end());
}
int get(int v, int sl, int sr, int ql, int qr, int val) {
  if (ql >= sr || qr <= sl) return 0;
  if (ql <= sl && sr <= qr) {
    vector<int>::iterator it = lower_bound(ar[v].begin(), ar[v].end(), val);
    if (it == ar[v].end()) return ar[v].size();
    return (int)(it - ar[v].begin());
  }
  int med = (sl + sr) / 2;
  return get(2 * v, sl, med, ql, qr, val) +
         get(2 * v + 1, med, sr, ql, qr, val);
}
bool cmp(int i, int j) { return a[i] < a[j]; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  make(1, 0, n);
  for (int k = 1; k < n; k++)
    for (int i = 0; i * k + 1 < n; i++) {
      int c1 = i * k + 1, c2 = min(n, c1 + k);
      ans[k] += get(1, 0, n, c1, c2, a[i]);
    }
  for (int i = 1; i < n; i++) cout << ans[i] << ' ';
}
