N = gets.to_i

cnt = Hash.new { 0 }

1.upto(N) do |x|
  x.upto(N) do |y|
    subtotal = x**2 + y**2 + x*y
    break if subtotal > 10000

    y.upto(N) do |z|
      total = subtotal + z**2 + y*z + z*x

      break if total > 10000

      case
      when x == y && y == z then cnt[total] += 1
      when x == y || y == z then cnt[total] += 3
      else                       cnt[total] += 6
      end
    end
  end
end

1.upto(N) do |i|
  puts cnt[i]
end

