#include <bits/stdc++.h>
std::vector<int> heap;
int num;
std::vector<int> calculate() {}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  std::cin >> num;
  heap.resize(num);
  for (int i = 0; i < num; ++i) {
    std::cin >> heap[i];
  }
  std::vector<int> result(num);
  int element = 1;
  while (element < num) {
    int xx = 0, begin, end;
    while (xx * xx < element) {
      end = (element - 1) / (xx + 1);
      if (xx == 0) {
        begin = num - 1;
      } else {
        begin = (element - 1) / xx;
      }
      if (heap[xx] > heap[element]) {
        result[end] += 1;
        result[begin] -= 1;
      }
      ++xx;
    }
    int parent;
    for (int kk = 1; kk < (element - 1) / xx + 1; ++kk) {
      parent = (element - 1) / kk;
      if (heap[parent] > heap[element]) {
        result[kk] -= 1;
        result[kk - 1] += 1;
      }
    }
    ++element;
  }
  int restore = 0;
  for (int i = 1; i < num; ++i) {
    restore += result[i - 1];
    std::cout << restore << " ";
  }
  return 0;
}
