#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  bool f = false;
  char ch = getchar();
  while (!isdigit(ch)) {
    f |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - 48;
    ch = getchar();
  }
  return f ? -x : x;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
const long long N = 200005, INF = 0x7fffffff;
long long n, a[N];
long long ans = 0, fa[N];
signed main() {
  n = read();
  a[0] = -INF;
  for (register long long i = 1; i <= n; i++) a[i] = read();
  for (register long long i = 1; i <= n; i++) {
    fa[i] = i - 1;
    if (a[i] < a[i - 1]) ans++;
  }
  write(ans);
  putchar(' ');
  for (register long long len = 2; len < n; len++) {
    for (register long long s = 1; s <= n; s += len) {
      long long now = (s - 1) / len + 1;
      for (register long long i = min(s + len, n); i >= s + 1; i--) {
        if (fa[i] != now) {
          if (a[i] < a[fa[i]]) ans--;
          fa[i] = now;
          if (a[i] < a[fa[i]]) ans++;
        } else
          break;
      }
    }
    write(ans);
    putchar(' ');
  }
  return 0;
}
