let create_int_array n = Array.init n (fun _ -> 0)

let calc x y z = x * x + y * y + z * z + x * y + y * z + z * x

let case x y z =
  if x = y then (if y = z then 1 else 3)
  else if y = z then 3
  else 6

let () =
  let n = read_int () in
  let a = create_int_array n in

  let rec f x =
    let k = 6 * x * x in
    if k <= n then
      let rec g y =
        let k = x * x + 3 * y * y + 2 * x * y in
        if n < k then f (x + 1)
        else
          let rec h z =
            let k = calc x y z in
            if n < k then g (y + 1)
            else
              let w = case x y z in
              a.(k - 1) <- a.(k - 1) + w;
              h (z + 1)
          in h y
      in g x
  in

  f 1;
  ignore (Array.map (fun i -> Printf.printf "%d\n" i) a);
  ()
