
f = {}
for x = 1, 100 do
  for y = 1, x do
    for z = 1, y do
    val = x * x + y * y + z * z + x * y + x * z + y * z
      if val <= 10000 then
        if x == y and y == z then
          f[val] = (f[val] or 0) + 1
        elseif (x == y and y ~= z) or (x == z and x ~=y) or(y == z and y ~= x) then
          f[val] = (f[val] or 0) + 3
        elseif (x ~= y and x ~= z and y ~= z) then
          f[val] = (f[val] or 0) + 6
        end
      end
    end
  end
end
n = io.read("*n")
for k = 1, n do print(f[k] or 0) end
