### BUGGY CODE ###

N = int(input())
def func(n):
  ret = 0
  for i in range(1,int(n**0.5)+1):
    for j in range(1,int(n**0.5)+1):
      for k in range(1,int(n**0.5)+1):
        if (i+j)**2+(j+k)**2+(k+i)**2 == 2*n:
          ret += 1
  return ret
ansadd = [84,18,45,33,30,0,126,9,36,30,27,30,66,18,54,0,36,42,48,6,42,0,54,6,57,12,84,54,48,6,60,6,63,18,42,36,78,0,24,24,33,24,105,24,66,27,48,0,48,30,60,30,54,0,42,3,75,48,24,12,66,12,96,6,30,12,87,21,36,0,30,24,69,12,57,30,48,24,54,0,42,54,24,24,72,0,60,0,48,24,69,24,42,18,36,12,66,24,36,42,18,0,78,9,48,36,42,42,36,12,36,21,78,18,48,12,102,0,18,12,54,24,45,27,42,13,108,12,39,24,42,27,102,0,60,6,39,24,54,12,54,24,24,0,114,24,63,48,30,0,48,6,69,36,18,12,72,6,48,18,33,54,117,12,42,0,66,12,48,6,54,36,42,21,102,6,48,54,33,30,48,0,72,0,30,24,75,24,84,30,30,0,72,18,30,42,54,0,60,12,36,45,42,12,96,6,66,0,12,36,78,36,42,0,36,0,78,24,48,24,18,30,90,15,96,18,27,21,54,0,24,21,48,27,84,18,48,42,36,6,66,12,108,12,42,0,48,9,27,60,21,36,84,6,36,18,42,18,54,18,60,0,60,15,72,9,99,42,12,12,60,0,57,42,18,18,78,0,42,6,36,36,63,9,42,15,30,18,78,6,24,48,42,0,102,12,75,45,42,30,84,24,66,9,24,30,90,24,42,0,24,3,84,21,84,33,66,24,36,6,36,48,51,18,72,0,66,18,54,30,24,18,48,18,30,0,102,12,45,36,24,0,102,3,42,15,42,54,54,21,66,24,66,30,102,3,66,0,48,12,24,30,45,36,54,6,78,9,48,24,39,36,96,0,66,6,27,27,60,30,18,30,48,12,90,24,60,36,6,0,42,12,78,36,36,24,114,6,60,0,18,6,69,18,84,0,36,6,48,6,39,24,42,24,54,6,72,48,36,42,60,0,48,0,36,18,138,24,30,30,42,18,75,18,48,18,24,0,78,0,78,57,60,9,48,9,36,30,30,42,42,39,84,0,24,12,87,27,30,42,24,24,90,0,36,24,60,36,84,0,42,0,30,21,87,12,72,24,42,12,60,30,72,21,60,0,96,12,30,42,39,18,66,12,84,12,63,42,42,24,42,0,18,6,78,15,75,45,54,12,54,6,84,30,30,18,54,0,42,24,39,27,96,18,42,21,48,0,54,18,33,36,66,0,84,0,75,48,30,42,54,12,54,15,42,30,96,18,42,0,18,6,123,15,48,24,48,39,42,6,21,54,45,12,60,0,90,12,30,36,45,18,72,21,78,12,30,12,60,30,18,0,78,6,60,36,33,18,60,12,30,0,60,18,90,30,54,0,36,1,78,27,84,30,18,15,102,9,27,30,24,57,90,0,42,9,48,42,42,12,72,27,48,9,108,18,48,48,18,0,84,6,66,24,48,21,114,6,78,24,30,30,42,18,60,0,18,12,63,9,51,66,48,15,54,0,66,60,36,18,48,0,66,6,36,30,96,9,36,30,30,24,93,24,72,24,66,0,60,24,48,30,24,30,72,6,60,12,30,12,93,18,72,0,30,0,81,30,36,48,36,30,90,6,54,24,57,24,36,0,54,18,36,24,78,18,72,33,12,0,51,30,48,24,42,0,90,3,78,30,30,27,138,6,30,18,36,24,75,24,12,0,54,12,42,18,84,36,30,18,66,6,45,36,36,48,114,0,24,6,30,21,108,15,48,18,36,18,57,24,63,42,54,0,78,6,81,36,18,24,42,18,120,0,24,24,66,12,54,0,48,12,66,18,42,36,48,18,72,6,48,48,33,6,102,0,54,24,39,54,60,12,90,18,36,3,111,24,51,48,42,0,90,0,45,36,54,48,54,24,18,18,51,18,72,0,54,0,18,12,54,36,57,18,42,18,120,0,63,42,27,36,48,0,54,6,39,30,81,18,72,33,54,9,72,12,54,54,24,0,54,15,75,24,60,12,78,6,30,12,39,54,72,6,54,0,72,6,78,12,54,39,30,15,48,6,57,48,18,24,90,0,90,18,42,24,39,42,24,30,42,0,84,6,66,30,30,0,30,0,27,42,39,33,90,24,84,18,51,36,69,24,54,0,42,18,87,33,51,18,42,9,126,9,84,36,66,18,54,0,36,0,66,12,48,15,54,30,18,18,60,18,96,54,42,0,102,0,27,36,30,36,108,15,54,0,24,36,60,24,66,0,30,0,54,15,75,48,36,18,48,24,36,36,54,15,108,0,84,18]
if N <= 9000:
  for i in range(1,N+1):
    print(func(i))
else:
  for i in range(1,9000):
    print(func(i))
  for i in range(9001,N):
    print(ansadd[i-9001])

### FIXED CODE ###

N = int(input())
ans = [0]*10050
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      v = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if v < 10050:
        ans[v] += 1
for i in range(N):
  print(ans[i+1])