n = io.read("*n")
for k = 1, n do
  cnt = 0
  for x = 1, math.floor(math.sqrt(k / 6)) do
    for y = 1, x do
      for z = 1, y do
        if (x * x + y * y + z * z + x * y + x * z + y * z) == k then
          if x == y and y == z then
            cnt = cnt + 1
          elseif (x == y and y ~= z) or (x == z and x ~=y) or(y == z and y ~= x) then
            cnt = cnt + 3
          elseif (x ~= y and x ~= z and y ~= z) then
            cnt = cnt + 3
          end
        end
      end
    end
  end
  print(cnt)
end