import Foundation

func originSqrt(_ n: Int) -> Int {
    return Int(sqrt(Double(max(0,n))))
}

let N = Int(readLine()!)!

for n in 1...N {
    var cnt = 0
    for x in 1...originSqrt(n)+1 {
        let xx = x * x
        for y in 1...originSqrt(n-xx)+1 {
            let yy = y * y
            let xy = x * y
            for z in 1...originSqrt(n-xx-yy)+1 {
                let zz = z * z
                let yz = y * z
                let zx = z * x
                let f_n = xx + yy + zz + xy + yz + zx
                if n == f_n {
                    cnt += 1
                }
            }
        }
    }
    print(cnt)
}