#include <bits/stdc++.h>
using namespace std;
int read_int() {
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') {
    c = getchar();
  }
  bool sign = 0;
  if (c == '-') {
    sign = 1;
    c = getchar();
  }
  int ret = 0;
  while (c >= '0' && c <= '9') {
    ret = 10 * ret + c - 48;
    c = getchar();
  }
  if (sign) return -ret;
  return ret;
}
int read_string(char* s) {
  int n = 0;
  char c = getchar();
  while (c < 'a' || c > 'z') c = getchar();
  while (c >= 'a' && c <= 'z') {
    s[n] = c - 'a';
    n++;
    c = getchar();
  }
  return n;
}
struct segtree_node {
 public:
  long long sum;
  void merge(segtree_node& l, segtree_node& r) { sum = l.sum + r.sum; }
};
template <class node>
class segtree {
  template <bool b>
  class param {};
  inline void spltdwn(int idx, param<true>) { splt(idx); }
  inline void splt(int idx) {
    idx >>= 1;
    if (idx > 0) splt(idx);
    tree[idx].split(tree[idx << 1], tree[(idx << 1) | 1]);
  }
  inline void spltdwn(int, param<false>){};
  inline void split(node& a, node& b, node& c, param<true>) {
    return a.split(b, c);
  }
  inline void split(node&, node&, node&, param<false>) {}
  template <typename t, void (t::*)(t&, t&)>
  class T {};
  template <typename t>
  static char test(T<t, &t::split>*) {
    return 0;
  }
  template <typename t>
  static long double test(...) {
    return 0;
  }
  int u, v;
  node query(int root, int left_range, int right_range) {
    if (u <= left_range && right_range <= v) return tree[root];
    int mid = (left_range + right_range) >> 1, l = root << 1, r = l | 1;
    if (has_split) split(tree[root], tree[l], tree[r], param<has_split>());
    node res;
    if (u >= mid)
      res = query(r, mid, right_range);
    else if (v <= mid)
      res = query(l, left_range, mid);
    else {
      node n1 = query(l, left_range, mid), n2 = query(r, mid, right_range);
      res.merge(n1, n2);
    }
    if (has_split) tree[root].merge(tree[l], tree[r]);
    return res;
  }
  template <void (*fn)(node&)>
  void local_update(int root, int left_range, int right_range) {
    if (u <= left_range && right_range <= v) {
      return fn(tree[root]);
    }
    int mid = (left_range + right_range) >> 1, l = root << 1, r = l | 1;
    if (has_split) split(tree[root], tree[l], tree[r], param<has_split>());
    if (v > mid) local_update<fn>(r, mid, right_range);
    if (u < mid) local_update<fn>(l, left_range, mid);
    tree[root].merge(tree[l], tree[r]);
  }
  void mrgup(int idx) {
    idx >>= 1;
    while (idx > 0)
      tree[idx].merge(tree[idx << 1], tree[(idx << 1) | 1]), idx >>= 1;
  }

 public:
  static bool const has_split = (sizeof(test<node>(0)) == sizeof(char));
  int N;
  int leftmost_leaf, rightmost_leaf;
  node* tree;
  node identity;
  segtree() { tree = 0; }
  ~segtree() {
    if (tree) delete[] tree;
  }
  void init(int n, const node a[], const node& identity) {
    if (tree) delete[] tree;
    this->identity = identity;
    N = 0;
    while ((1 << N) < n) N++;
    leftmost_leaf = 1 << N;
    rightmost_leaf = leftmost_leaf << 1;
    tree = new node[rightmost_leaf];
    for (int i = 0; i < n; i++) tree[i + leftmost_leaf] = a[i];
    for (int i = n + leftmost_leaf; i < rightmost_leaf; i++) tree[i] = identity;
    for (int i = leftmost_leaf - 1; i; i--)
      tree[i].merge(tree[i << 1], tree[(i << 1) | 1]);
  }
  node query(int u, int v) {
    this->u = u + leftmost_leaf;
    this->v = v + leftmost_leaf + 1;
    return query(1, leftmost_leaf, rightmost_leaf);
  }
  node query(int u) {
    u += leftmost_leaf;
    spltdwn(u, param<has_split>());
    return tree[u];
  }
  template <void (*fn)(node&)>
  void update(int u, int v) {
    this->u = u + leftmost_leaf;
    this->v = v + leftmost_leaf + 1;
    return local_update<fn>(1, leftmost_leaf, rightmost_leaf);
  }
  template <void (*fn)(node&)>
  void update(int u) {
    u += leftmost_leaf;
    spltdwn(u, param<has_split>());
    fn(tree[u]);
    mrgup(u);
  }
  void split_down(int leaf_idx) {
    spltdwn(leaf_idx + leftmost_leaf, param<has_split>());
  }
  void merge_up(int leaf_idx) { mrgup(leaf_idx + leftmost_leaf); }
  bool is_leaf(int tree_idx) { return tree_idx >= leftmost_leaf; }
  int binary_search(node k) {
    int root = 1;
    node n = identity;
    assert(!(k < identity));
    while (!is_leaf(root)) {
      int left_child = root << 1, right_child = left_child | 1;
      if (has_split)
        split(tree[root], tree[left_child], tree[right_child],
              param<has_split>());
      node m;
      m.merge(n, tree[left_child]);
      if (m < k) {
        n = m;
        root = right_child;
      } else
        root = left_child;
    }
    node m;
    m.merge(n, tree[root]);
    mrgup(root);
    if (m < k)
      return root - leftmost_leaf;
    else
      return root - 1 - leftmost_leaf;
  }
};
segtree_node sn[200005];
segtree<segtree_node> st;
void upd(segtree_node& cur) { cur.sum++; }
int a[200005];
vector<int> v[200005];
int ans[200005];
vector<pair<int, pair<int, int> > > d[200005];
bool process() {
  int n = read_int();
  vector<int> b;
  for (int i = 1; i <= n; i++) {
    a[i] = read_int();
    b.push_back(a[i]);
  }
  sort(b.begin(), b.end());
  b.erase(unique(b.begin(), b.end()), b.end());
  map<int, int> c;
  int p = b.size();
  for (int i = 0; i < p; i++) {
    c[b[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    a[i] = c[a[i]];
    v[a[i]].push_back(i);
  }
  for (int i = 0; i <= n; i++) {
    sn[i].sum = 0;
  }
  sn[n + 1].sum = 0;
  st.init(n + 1, sn, sn[n + 1]);
  for (int k = 1; k < n; k++) {
    for (int i = 1; k * (i - 1) + 2 <= n; i++) {
      d[a[i]].push_back(
          make_pair(k, make_pair(k * (i - 1) + 2, min(n, k * i + 1))));
    }
  }
  for (int i = 0; i < p; i++) {
    for (int j = 0; j < d[i].size(); j++) {
      ans[d[i][j].first] +=
          st.query(d[i][j].second.first, d[i][j].second.second).sum;
    }
    for (int j = 0; j < v[i].size(); j++) {
      st.update<&upd>(v[i][j]);
    }
  }
  for (int i = 1; i < n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 1;
}
int main() {
  srand(time(NULL));
  int t = 1;
  while (t-- > 0) {
    if (!process()) break;
  }
  return 0;
}
