#include <bits/stdc++.h>
using namespace std;
template <class T>
void debug(T a, T b) {
  ;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
namespace std {
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& a) {
  out << '(' << a.first << ',' << a.second << ')';
  return out;
}
}  // namespace std
long long int readL() {
  long long int res;
  scanf("%I64d", &res);
  return res;
}
void printL(long long int res) { printf("%I64d", res); }
int n;
int ar[200005];
int res[200005], sum[200005];
const int B = 500;
inline int par(int a, int k) { return (a + k - 2) / k; }
pair<int, int> range[505];
int main() {
  cin >> n;
  for (int i = 0; i < (n); ++i) scanf("%d", &ar[i + 1]);
  for (int i = 0; i < (B); ++i) range[i] = make_pair(1, 1);
  range[1] = make_pair(1, n);
  for (int i = 2; i <= n; ++i) {
    for (int j = 1; j < min(B, n + 1); ++j) {
      if (ar[j] > ar[i]) {
        sum[range[j].first]++;
        sum[range[j].second]--;
      }
      while (range[j].first <= n + 1 && j < par(i + 1, range[j].first))
        ++range[j].first;
      while (range[j].second <= n + 1 && j <= par(i + 1, range[j].second))
        ++range[j].second;
    }
    for (int k = 1; k < B; ++k) {
      int p = par(i, k);
      if (p < B) break;
      if (ar[p] > ar[i]) ++res[k];
    }
  }
  for (int i = 0; i < (n + 1); ++i) sum[i + 1] += sum[i];
  for (int k = 1; k < n; ++k) printf("%d\n", res[k] + sum[k]);
  return 0;
}
