#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 100;
struct Bit {
  vector<int> bit;
  int n;
  Bit(int _n) : n(_n) { reset(); }
  void reset() { bit.assign(n + 1, 0); }
  void update(int index, int val) {
    for (int i = index; i <= n; i += i & -i) bit[i] += val;
  }
  int query(int index) {
    int ans = 0;
    for (int i = index; i > 0; i -= i & -i) ans += bit[i];
    return ans;
  }
};
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int N;
  cin >> N;
  vector<pair<int, int>> arr;
  int num;
  for (int i = 0; i < N; ++i) {
    cin >> num;
    arr.push_back({num, i});
  }
  sort(arr.begin(), arr.end());
  Bit bit(N + 1);
  int loChild, hiChild, index, ans[N];
  fill(ans, ans + N, 0);
  for (int i = 0; i < N; ++i) {
    index = arr[i].second;
    for (int k = 1; k * index + 1 < N && k < N; ++k) {
      loChild = k * index + 1, hiChild = k * index + k;
      ans[k] += bit.query(min(hiChild + 1, N)) - bit.query(loChild);
    }
    bit.update(index + 1, 1);
  }
  for (int k = 1; k < N; ++k) cout << ans[k] << ' ';
  cout << endl;
}
