program r20711c

implicit none
integer :: x, y, z, n, f, i
integer :: a(1:11000)

a = 0

read *, n
 do x = 1, 100
  do y = 1, x
   roop: do z = 1, y
    f = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
    if(f > 11000) then
     exit roop
    end if
    if(x == z) then
     a(f) = a(f) + 1
    else if(x == y .or. y == z) then
     a(f) = a(f) + 3
    else
     a(f) = a(f) + 6
    end if
   end do roop
  end do 
end do 

do i = 1, n
 print *, a(i)
end do
   
end program r20711c
