#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline string tostr(const T& x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
inline long long parse(const string& s) {
  stringstream ss(s);
  long long x;
  ss >> x;
  return x;
}
const double EPS = 1e-9;
const int inf = 1000 * 1000 * 1000;
const char cinf = 102;
const long long linf = inf * 1ll * inf;
const double dinf = 1e200;
const double PI = 3.1415926535897932384626433832795l;
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long powmod(long long a, long long p, long long m) {
  long long r = 1;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
vector<int> solve(vector<int> A, bool fast = true) {
  int n = ((int)(A).size());
  vector<int> res;
  const int B = 450;
  vector<vector<int>> C(B, vector<int>(n + 1));
  for (int q = 0; q < (min(n, B)); ++q) {
    for (int i = 0; i < (n); ++i) {
      C[q][i + 1] = C[q][i] + (A[i] < A[q]);
    }
  }
  for (int k = 1; k < n; ++k) {
    int r = 0;
    if (fast && 1 + k + 1ll * k * k >= n) {
      for (int i = 1; i * k + 1 < n; ++i) {
        assert(i <= k);
        r += C[i][min(n, i * k + k + 1)] - C[i][min(n, i * k + 1)];
      }
      r += C[0][k + 1] - C[0][1];
    } else {
      for (int i = 1; i < n; ++i) {
        r += A[i] < A[(i - 1) / k];
      }
    }
    res.push_back(r);
  }
  return res;
}
void stress() {
  for (int n = 2; n < 100; ++n) {
    vector<int> A(n);
    for (int i = 0; i < (n); ++i) A[i] = i;
    for (int q = 0; q < (10000); ++q) {
      random_shuffle((A).begin(), (A).end());
      auto b = solve(A, false);
      auto r = solve(A, true);
      if (b != r) {
        cerr << "failed " << n << ' ' << q << endl;
        cout << ((int)(A).size()) << endl;
        for (int i = 0; i < (((int)(A).size())); ++i) {
          cout << A[i] << ' ';
        }
        return;
      }
    }
  }
  cerr << "passed" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = 0; i < (n); ++i) cin >> A[i];
  vector<int> r = solve(A);
  for (int i = 0; i < (((int)(r).size())); ++i) cout << r[i] << ' ';
  return 0;
}
