#include "bits/stdc++.h"
using namespace std;
#define FOR(i,s,t) for(int i = s; i < t; i++)
using LL = long long;
using ll = long long;

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

int cnt[100005];
#define SZ(a) (int)a.size()
#define DEBUGL(x) cerr<<#x":="<<x<<endl
#define DEBUGS(x) cerr<<#x":="<<x<<" "
#define ENDL cerr<<endl
template <typename Monoid>
struct SegmentTree {
    using nd = typename Monoid::type;
    const int ARY_SIZE;
    vector<nd>node;
public:
    SegmentTree(int n) :ARY_SIZE(n), node(2 * ARY_SIZE, Monoid::id()) {}
    inline void update(int i, const nd val) {
        i += ARY_SIZE; node[i] =(val);
        while (i > 1) {
            i >>= 1; node[i] = Monoid::op(node[i << 1], node[(i << 1) + 1]);
        }
    }
    inline nd query(int l, int r) {
        if (l >= r)return Monoid::id();
        nd vl = Monoid::id(), vr = Monoid::id();
        for (l += ARY_SIZE, r += ARY_SIZE; l != r; l >>= 1, r >>= 1) {
            if (l & 1) {
                vl = Monoid::op(vl, node[l++]);
            }
            if (r & 1) {
                vr = Monoid::op(node[--r], vr);
            }
        }
        return Monoid::op(vl, vr);
    }
    nd operator[](int i) { return node[i + ARY_SIZE]; }
};
using PII = pair<int, int>;
struct Monoid {
    using type = PII;
    static type id() { return PII(0, 0); };
    static type op(const type&l, const type &r) {
        int la = l.first;
        int lb = r.first;
        int cnt = (la >= 2) + (lb >= 2);
        return PII(0, cnt + l.second + r.second);
    }
};

int main() {
    int N, W;
    while (cin >> N >> W) {
        SegmentTree<Monoid> seg(N+1);
        if (W == 1) {
            FOR(i, 0, N) {
                cout << 1 << " \n"[i == N - 1];
            }
            return 0;
        }
        
        vector<int>IQ1;
        int ans = W;
        IQ1.push_back(ans);
        ans = 0;
        FOR(i, 1, W + 1) {
            auto vecs = divs(i);
            for (auto it : vecs) {
                cnt[it]++;
                auto a = seg[it];
                seg.update(it, PII(a.first + 1, 0));
            }
        }
        ans = 0;
        FOR(R, W + 1, N+1) {
            int L = R - W;
            pair<int, int> range = { L + 1,R };
            auto outofrange = [&](int x) {
                if (range.first > x || range.second < x)return true;
                else return false;
            };
            
            // dec of L element
            {
                for (auto it : divs(L)) {
                    auto a = seg[it];
                    seg.update(it, PII(a.first - 1, 0));
                }
            }
            //
            
            
            // add R into set
            {
                for (auto it : divs(R)) {
                    auto a = seg[it];
                    seg.update(it, PII(a.first + 1, 0));
                }
            }
            // sum info
            auto res = seg.query(0, L + 1);
            int c = res.second;
            IQ1.push_back(c + W);
        }
        //IQ1.back()--;
        FOR(i, 0, SZ(IQ1)) {
            cout << IQ1[i] << " \n"[(i + 1) == SZ(IQ1)];
        }
    }
    
}

