#include <bits/stdc++.h>
std::vector<int> heap(200007, 0);
std::vector<int> answers(200007, 0);
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int among;
  std::cin >> among;
  for (int ind = 0; ind < among; ++ind) {
    std::cin >> heap[ind];
  }
  for (int indF = 1; indF <= among - 1; ++indF) {
    int jndS;
    for (jndS = 0; jndS * jndS < indF; ++jndS) {
      int left_pos;
      int right_pos = (indF - 1) / (jndS + 1);
      if (jndS == 0) {
        left_pos = among - 1;
      } else {
        left_pos = (indF - 1) / jndS;
      }
      if (heap[indF] < heap[jndS]) {
        answers[right_pos] = answers[right_pos] + 1;
        answers[left_pos] = answers[left_pos] - 1;
      }
    }
    for (int knd = 1; knd < (indF - 1) / jndS + 1; ++knd) {
      int parent = (indF - 1) / knd;
      if (heap[indF] < heap[parent]) {
        answers[knd] = answers[knd] - 1;
        answers[knd - 1] = answers[knd - 1] + 1;
      }
    }
  }
  int answer = 0;
  for (int ind = 1; ind <= among - 1; ++ind) {
    answer += answers[ind - 1];
    std::cout << answer << " ";
  }
  return 0;
}
