open Printf
open Scanf

let id x = x
exception Break

let n = scanf "%d"id

let int_sqrt n = truncate (sqrt (float n))

let run () =
    let nn = Array.init (n + 1) (fun _ -> ref 0) in
    let max = int_sqrt n in
    begin
        try for x = 1 to max do
            try for y = 1 to max do
                try for z = 1 to max do
                    let i = x * x + y * y + z * z + x * y + y * z + z * x in
                    if i > n then begin
                        raise Break
                    end else incr (nn.(i))
                done with Break -> ()
            done with Break -> ()
        done with Break -> ()
    end;
    for i = 1 to n do
        printf "%d\n" !(nn.(i))
    done
    
let () = run ()
