let calc (x, y, z) = x * x + y * y + z * z + x * y + y * z + z * x

let count (x, y, z) = 
  if x = y && x = z then 
    1
  else if x <> y && y <> z && z <> x then
    6
  else 
    3

let rec findUpper x num =
  if calc (x, 1, 1) < num then
     findUpper (x + 1) num
  else
    x

let n = stdin.ReadLine() |> int


let rec fillList index tList fList = 
  match fList with
  | (i, ans)::l when index = i -> fillList (index + 1) (ans::tList) l 
  | (i, _)::_ when index <> i -> fillList (index + 1) (0::tList) fList
  | [] when index <= n -> fillList (index + 1) (0::tList) fList
  | [] when index > n -> tList

seq {
    for x in 1 .. findUpper 1 n do
      for y in 1 .. x do
        for z in 1 .. y -> (calc (x, y, z), (x, y, z))
} 
|> Seq.filter (fun (i, _) -> i <= n)
|> Seq.groupBy (fun (calc, _) -> calc)
|> Seq.toList
|> List.map (fun (i, (seq)) -> (i, seq |> Seq.toList |> List.map (fun (_, i) -> i) |> List.sumBy count))
|> fillList 1 []
|> List.rev
|> List.map (printfn "%d")