let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let arr = Array.make n 0 in
  let m = int_of_float (sqrt (float_of_int n)) in
  for x = 1 to m do
    for y = 1 to m do
      for z = 1 to m do
        let i = x * x + y * y + z * z + x * y + y * z + z * x in
        if i <= n then arr.(i-1) <- arr.(i-1) + 1
      done;
    done;
  done;
  Array.iter (fun x -> Printf.printf "%d\n" x) arr