#include using namespace std; #define rep(i,n)for (int i = 0; i < (n); ++i) int hist[160001], ans[160001]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; rep(a, m + 1) { int tot1 = a * a; rep(b, a) { int s2 = a + b; int tot2 = tot1 + s2 * b; if (tot2 > n) break; rep(c, b) { int s3 = s2 + c; int tot3 = tot2 + s3 * c; if (tot3 > n) break; rep(d, c) { int s4 = s3 + d; int tot4 = tot3 + s4 * d; if (tot4 > n) break; hist[tot4] += 24; } } } } const int perm[] = {1, 1, 2, 6, 24}; for(int bit = 1; bit < 8; bit++) { rep(a, m + 1) { for(int b = bit & 1 ? a : 0; b < (bit & 1 ? a + 1 : a); ++b) { int tot2 = a * a + a * b + b * b; if (tot2 > n) break; for(int c = bit & 2 ? b : 0; c < (bit & 2 ? b + 1 : b); ++c) { int tot3 = tot2 + (a + b + c) * c; if (tot3 > n) break; for(int d = bit & 4 ? c : 0; d < (bit & 4 ? c + 1 : c); ++d) { int tot4 = tot3 + (a + b + c + d) * d; if (tot4 > n) break; int dup = 1; int i = 0; for(int j = 0; j < 4; ++j) if ((bit >> j & 1) == 0) { int len = j - i + 1; dup *= perm[len]; i = j + 1; } hist[tot4] += 24 / dup; } } } } } rep(i, n + 1) cout << hist[i] << '\n'; }