#include <bits/stdc++.h>
using namespace std;
const int LG = 20;
const int N = 200005;
const int inf = 1000000009;
int rd() {
  char c = getchar();
  int t = 0, f = 1;
  while (!isdigit(c)) f = (c == '-') ? -1 : 1, c = getchar();
  while (isdigit(c)) t = t * 10 + c - 48, c = getchar();
  return t * f;
}
void wt(int x) {
  if (x > 9) wt(x / 10);
  putchar(x % 10 + 48);
  return;
}
int A[N], rt[N], Hash[N], L, R, n;
int l[N * LG], r[N * LG], sum[N * LG], seg;
void Newnode(int &p, int f) {
  p = ++seg;
  l[p] = l[f];
  r[p] = r[f];
  sum[p] = sum[f] + 1;
  return;
}
void Modify(int &p, int f, int L, int R, int x) {
  Newnode(p, f);
  if (L == R) return;
  int mid = L + R >> 1;
  if (x <= mid)
    Modify(l[p], l[f], L, mid, x);
  else
    Modify(r[p], r[f], mid + 1, R, x);
}
int Query(int rp, int lp, int L, int R, int x) {
  int Ret = 0, mid;
  while (!(sum[rp] - sum[lp] == 0 || L == R || !rp || !lp)) {
    mid = L + R >> 1;
    if (x <= mid)
      rp = l[rp], lp = l[lp], R = mid;
    else
      Ret += sum[l[rp]] - sum[l[lp]], rp = r[rp], lp = r[lp], L = mid + 1;
  }
  return Ret;
}
void solve(int k) {
  int Ans = 0;
  for (int i = 1; i <= n; i++) {
    L = k * (i - 1) + 2, R = k * i + 1;
    if (L > n) break;
    if (R > n) R = n;
    Ans += Query(rt[R], rt[L - 1], 1, n, A[i]);
  }
  wt(Ans), putchar(32);
  return;
}
int main() {
  n = rd();
  for (int i = 1; i <= n; i++) A[i] = Hash[i] = rd();
  sort(Hash + 1, Hash + n + 1);
  for (int i = 1; i <= n; i++) {
    A[i] = lower_bound(Hash + 1, Hash + n + 1, A[i]) - Hash;
    Modify(rt[i], rt[i - 1], 1, n, A[i]);
  }
  for (int i = 1; i <= n - 1; i++) solve(i);
  return 0;
}
