import Foundation

func main(){
   let n = Int(readLine()!)!

   var cache:[Int:Set<String>] = [:]
   
   outerLoop: for x in 1...n {
      for y in 1...n {
         for z in 1...n {
            let computed = x*x + y*y + z*z + x*y + y*z + z*x
            cache[computed] = cache[computed] ?? []
            cache[computed]?.insert("\(x)\(y)\(z)")
            if computed > n && y == 1 && z == 1 {
               break outerLoop
            }
         }
      }
   }
   
   for i in 1...n {
      print(cache[i]?.count ?? 0)
   }
}
main()