#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:256000000")
const int N = 200000;
int n, m;
int mas[N];
int ans[N];
int add[N];
int tak[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> mas[i];
  int t = sqrt(double(n)) + 1;
  for (int i = 1; i <= t; ++i) {
    for (int j = 0; j < n; ++j)
      for (int k = i * j + 1; k <= min(n - 1, i * j + i); ++k)
        ans[i] += (mas[k] < mas[j]);
  }
  for (int i = 1; i < n; ++i) {
    for (int j = 1; j <= t; ++j) {
      int k1 = (i - 1) / j;
      int k2 = i / (j + 1);
      if (i % (j + 1)) k2++;
      if (k2 > k1) continue;
      add[k2] += mas[i] < mas[j];
      tak[k1] -= mas[i] < mas[j];
    }
    add[i] += (mas[i] < mas[0]);
  }
  for (int i = t + 1; i < n; ++i) ans[i] = ans[i - 1] + add[i] + tak[i - 1];
  for (int i = 1; i < n; ++i) cout << ans[i] << ' ';
}
