fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val ans = IntArray(n) {0}
    val max = Math.sqrt(n.toDouble()).toInt() + 1
    for (i in 1..max) {
        for (j in 1..max) {
            for (k in 1..max) {
                val l = i*i + j*j + k*k + i*j + j*k + k*i
                if (l <= n) ans[l-1]++
            }
        }
    }
    repeat(n) {
        println(ans[it])
    }
}
