#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
int n, a[200005], c[200005];
inline int add(int l, int r, int x) { c[l] += x, c[r + 1] -= x; }
signed main() {
  n = read();
  int t = n - 1;
  for (register int i = (0); i <= (n - 1); ++i) a[i] = read();
  for (register int i = (1); i <= (n - 1); ++i) {
    t = i - 1;
    for (int l = 1, r = 0; l <= t; l = r + 1) {
      r = t / (t / l);
      add(l, r, a[i] < a[t / l]);
    }
    if (a[i] < a[0]) c[i]++;
  }
  for (register int i = (1); i <= (n - 1); ++i)
    c[i] += c[i - 1], cout << c[i] << ' ';
  return 0;
}
