#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }

#include <set>
#include <iostream>
using namespace std;

vector<int> divs(int n){
  vector<int> ret;
  for(int i = 1; i * i <= n; i++){
    if(n % i == 0){
      ret.push_back(i);
      if(i * i != n) ret.push_back(n / i);
    }
  }
  return ret;
}

int main(){
  const int n = getInt();
  const int w = getInt();

  vector<int> cnt(n + 1);

  int ans = 0;
  for(int i = 1; i <= n; i++){
    const int low  = i - w;
    const int high = i;

    {
      ans++;
      const vector<int> d = divs(high);
      REP(j,d.size()){
        const int dd = d[j];
        if(++cnt[dd] == 2 && dd < low)
          ans++;
      }
    }

    if(low > 0){
      const vector<int> d = divs(low);
      REP(j,d.size()){
        const int dd = d[j];
        if(--cnt[d[j]] == 1 && dd != low)
          ans--;
      }
      if(cnt[low] <= 1) ans--;
    }

    // REP(j,n+1) printf("%d: %d\n", j, cnt[j]);

    if(i >= w)
      printf("%d%c", ans, i == n ? '\n' : ' ');
  }

  return 0;
}