#include <bits/stdc++.h>
using namespace std;
const int N = 200100, SQ = 450;
int a[N], ans[N], ps[N];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 2; i <= n; i++) {
    int t = min(i - 1, SQ);
    ps[max(t + 1, i - 1)] += (a[1] > a[i]);
    ps[n] -= (a[1] > a[i]);
    int lst = i - 1;
    for (int j = 1; j <= t; j++) {
      int x = (i - 1) / j + ((i - 1) % j != 0);
      ans[j] += (a[x] > a[i]);
      if (j == 1) {
        continue;
      }
      if (ceil((double)(i - 1) / (double)x) == j) {
        ps[max(x, t + 1)] += (a[j] > a[i]);
        ps[max(lst, t + 1)] -= (a[j] > a[i]);
        lst = x;
      } else {
        lst = x + 1;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    ps[i] += ps[i - 1];
  }
  for (int i = 1; i < n; i++) {
    cout << ans[i] + ps[i] << " ";
  }
  cout << endl;
  return 0;
}
