## https://yukicoder.me/problems/no/1318 def calc(a, b, c, d): return a * ( a + b + c + d) + b * (b + c + d) + c * (c + d) + d ** 2 def main(): N, M = map(int, input().split()) answer = [0] * (N + 1) for a in range(M + 1): n = 10 * a ** 2 if n > N: break answer[calc(a, a, a, a)] += 1 # 小さい方が1つ for a in range(M + 1): if 2 * a ** 2 > 2 * N: break for b in range(a + 1, M + 1): n = (a ** 2 + 3 * b ** 2) + (a + 3 * b) ** 2 if n > 2 * N: break answer[calc(a, b, b, b)] += 4 # 小さい方が2つ for a in range(M + 1): if 6 * a ** 2 > 2 * N: break for b in range(a + 1, M + 1): n = (2 * a ** 2 + 2 * b ** 2) + (2 * a + 2 * b) ** 2 if n > 2 * N: break answer[calc(a, a, b, b)] += 6 # 小さい方が3つ for a in range(M + 1): if 12 * a ** 2 > 2 * N: break for b in range(a + 1, M + 1): n = (3 * a ** 2 + b ** 2) + (3 * a + b) ** 2 if n > 2 * N: break answer[calc(a, a, a, b)] += 4 # 最小が2つ for a in range(M + 1): if 6 * a ** 2 > N: break for b in range(a + 1, M + 1): if (2 * a + b) ** 2 + 2 * a ** 2 + b ** 2 > 2 * N: break for c in range(b + 1, M + 1): n = (2 * a + b + c) ** 2 + 2 * a ** 2 + b ** 2 + c ** 2 if n > 2 * N: break answer[calc(a, a, b, c)] += 12 # 中間が2つ for a in range(M + 1): if 2 * a ** 2 > 2 * N: break for b in range(a + 1, M + 1): if (a + 2 * b) ** 2 + a ** 2 + 2 * b ** 2 > 2 * N: break for c in range(b + 1, M + 1): n = (a + 2 * b + c) ** 2 + a ** 2 + 2 * b ** 2 + c ** 2 if n > 2 * N: break answer[calc(a, b, b, c)] += 12 # 最大が2つ for a in range(M + 1): if 2 * a ** 2 > 2 * N: break for b in range(a + 1, M + 1): if (a + b) ** 2 + a ** 2 + b ** 2 > 2 * N: break for c in range(b + 1, M + 1): n = (a + b + 2 * c) ** 2 + a ** 2 + b ** 2 + 2 * c ** 2 if n > 2 * N: break answer[calc(a, b, c, c)] += 12 for a in range(M + 1): a2 = a ** 2 if 2 * a2 > 2 * N: break for b in range(a + 1, M + 1): b2 = b ** 2 if a2 + b2 + (a + b) ** 2 > 2 * N: break for c in range(b + 1, M + 1): c2 = c ** 2 if (a + b + c ) ** 2 + a2 + b2 + c2 > 2 * N: break for d in range(c + 1, M + 1): d2 = d ** 2 if a2 + b2 + c2 + d2 + (a + b + c + d) ** 2 > 2 * N: break answer[calc(a, b, c, d)] += 24 for i in range(N + 1): print(answer[i]) if __name__ == "__main__": main()