
--{-# LANGUAGE StandaloneDeriving #-}
--{-# LANGUAGE BangPatterns #-}

module Main where

import Debug.Trace
import Control.Monad
import Data.List
--import Data.Char
--import qualified Data.Set as Set
import qualified Data.Map.Strict as Map

main :: IO ()
main = do
  a <- read <$> getLine
  --a `traceShow`
  let m = createMap a
  forM_ [1..a] $ \i -> do
    print $ Map.findWithDefault 0 i m


createMap :: Int -> Map.Map Int Int
createMap n = foldr myInsert Map.empty $ [(x, y, z, val x y z) | x <- [1..n], x * x <= n, y <- [x..n], y * y <= n, z <- [y..n], z * z <= n]

myInsert :: (Int, Int, Int, Int) -> Map.Map Int Int -> Map.Map Int Int
myInsert (x, y, z, v) m = case length . group . sort $ [x, y, z] of
   1 -> Map.insertWith (+) v 1 m
   2 -> Map.insertWith (+) v 3 m
   3 -> Map.insertWith (+) v 6 m

val :: Int -> Int -> Int -> Int
val x y z = x * x + y * y + z * z + x * y + y * z + z * x
