n = gets.to_i
ans = []
t = Array.new(10**6,0)



(1..50).to_a.repeated_permutation(3) do |xyz|
  x = xyz[0]
  y = xyz[1]
  z = xyz[2]
  i = x**2 + y**2 + z**2 + x*y + y*z + x*z  
  j = t[i-1]
  h = j + 1
  t[i-1] = h
end

(1..n).each do |m|
  puts t[m-1]
end


        