open System

let mutable c = 0
let n_float = stdin.ReadLine() |> float32
let n_sqrt = sqrt n_float |> int
let n = n_float |> int

let anss =
    seq { for i in 1..n_sqrt do 
            for j in 1..n_sqrt do 
                for k in 1..n_sqrt do
                    let e = i*i+j*j+k*k+i*j+j*k+k*i
                    yield e
    } |> Seq.toArray

let a = Array.zeroCreate n
Array.iter (fun x ->
            if x <= n then
                a.[x-1] <- a.[x-1]+1 
        ) anss

for i in a do
    printfn "%d" i