#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:134217728")
using namespace std;
int n;
int a[1 << 18];
int add[1 << 18];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i < n; ++i) {
    int k = 1;
    while (k < n) {
      int p = (i - 1) / k;
      int next = -1;
      if (p == 0)
        next = n;
      else if (p == 1)
        next = i;
      else
        next = min((i - 1) / p + 1, n);
      if (a[p] > a[i]) {
        add[k]++;
        add[next]--;
      }
      k = next;
    }
  }
  int now = 0;
  for (int i = 1; i <= n - 1; ++i) {
    now += add[i];
    printf("%d ", now);
  }
  printf("\n");
  return 0;
}
