program answer
  implicit none

  integer(8) :: N, i, j, k, count, eg(10000)
  read(*,*) N
  eg=0
  do i = 1, 100
     do j = 1, 100
        do k= 1, 100
           if(i**2+j**2+k**2+i*j+j*k+k*i<=10000) then
              eg(i**2+j**2+k**2+i*j+j*k+k*i)=eg(i**2+j**2+k**2+i*j+j*k+k*i)+1
           end if
        end do
     end do
  end do

 
  do i = 1, N
     write(*,*) eg(i)
  end do
  stop
 end program answer