#include <bits/stdc++.h>
using namespace std;
int n;
int a[211111], ans[211111];
int mag = 555;
int l[211111], r[211111], oldl[211111], oldr[211111], cur[211111];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int k = 1; k <= min(n - 1, mag); k++) {
    int t = 0;
    for (int i = 1; i < n; i++)
      if (a[i] < a[(i - 1) / k]) t++;
    ans[k] = t;
  }
  for (int k = mag + 1; k <= n - 1; k++) {
    for (int i = 0; i <= k; i++) {
      l[i] = i * k + 1;
      r[i] = min(k * (i + 1), n - 1);
      if (l[i] >= n) break;
    }
    if (k == mag + 1) {
      for (int i = 0; i <= k; i++) {
        if (l[i] >= n) break;
        oldl[i] = l[i];
        oldr[i] = r[i];
        for (int j = l[i]; j <= r[i]; j++)
          if (a[i] > a[j]) cur[i]++;
      }
    } else {
      for (int i = 0; i <= k; i++) {
        if (l[i] >= n) break;
        while (oldl[i] < l[i]) {
          if (a[i] > a[oldl[i]]) cur[i]--;
          oldl[i]++;
        }
        while (oldr[i] < r[i]) {
          oldr[i]++;
          if (a[i] > a[oldr[i]]) cur[i]++;
        }
      }
    }
    int t = 0;
    for (int i = 0; i <= k; i++) {
      if (l[i] >= n) break;
      t += cur[i];
    }
    ans[k] = t;
  }
  for (int i = 1; i <= n - 1; i++) {
    printf("%d", ans[i]);
    if (i == n - 1)
      puts("");
    else
      putchar(' ');
  }
  return 0;
}
