#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 5;
struct BIT {
  int n, c[maxn];
  inline void init(int n) {
    this->n = n;
    fill(c, c + n + 1, 0);
  }
  inline void add(int p, int x) {
    for (; p <= n; p += p & -p) c[p] += x;
  }
  inline int query(int p) {
    int ret = 0;
    for (; p; p -= p & -p) ret += c[p];
    return ret;
  }
} bit;
pair<int, int> arr[maxn];
int ans[maxn];
int main() {
  int n;
  scanf("%d", &n);
  bit.init(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i].first);
    arr[i].second = i + 1;
  }
  sort(arr, arr + n);
  for (int i = 0, j = -1; i < n; i++) {
    int p = arr[i].second, v = arr[i].first;
    for (int k = 1; k < n; k++) {
      int st = k * (p - 1) + 2, ed = min(k * p + 1, n);
      if (st > n) break;
      ans[k] += bit.query(ed) - bit.query(st - 1);
    }
    if (i != n - 1 && v != arr[i + 1].first)
      for (; j < i; j++) bit.add(arr[j + 1].second, 1);
  }
  for (int i = 1; i < n; i++) printf("%d%c", ans[i], i == n - 1 ? '\n' : ' ');
}
