Problem:
 Score : 300 points    Problem Statement Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:   1 \leq x,y,z  x^2 + y^2 + z^2 + xy + yz + zx = n   Given an integer N , find each of f(1),f(2),f(3),\ldots,f(N) .      Constraints  All values in input are integers.  1 \leq N \leq 10^4         Input Input is given from Standard Input in the following format:  N       Output Print N lines. The i -th line should contain the value f(i) .        Sample Input 1 20      Sample Output 1 0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0   For n=6 , only (1,1,1) satisfies both of the conditions. Thus, f(6) = 1 .  For n=11 , three triples, (1,1,2) , (1,2,1) , and (2,1,1) , satisfy both of the conditions. Thus, f(6) = 3 .  For n=17 , three triples, (1,2,2) , (2,1,2) , and (2,2,1) , satisfy both of the conditions. Thus, f(17) = 3 .  For n=18 , three triples, (1,1,3) , (1,3,1) , and (3,1,1) , satisfy both of the conditions. Thus, f(18) = 3 .

Solution (Python):
def examA():
    L, R, D = LI()
    ans = R//D - (L-1)//D
    print(ans)
    return

def examB():
    N = I()
    A = LI()
    ans = 0
    for i,a in enumerate(A):
        if i%2==0:
            if a%2==1:
                ans += 1
    print(ans)
    return

def examC():
    N = I()
    ans = [0]*N
    for x in range(1,101):
        for y in range(1,101):
            for z in range(1,101):
                cur = x**2 + y**2 + z**2 + x*y + y*z + x*z
                if cur<N+1:
                    ans[cur-1] += 1

    for v in ans:
        print(v)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(2*10**6)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
N=int(input())
l=[0]*10000
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            s=i**2+j**2+k**2+i*j+j*k+k*i
            if s<=10000:
                l[s-1]+=1
print(*l[:N],sep="\n")

Solution (Python):
from collections import defaultdict

n = int(input())

result = defaultdict(int)

for x in range(1, 101):
	for y in range(1, 101):
		for z in range(1, 101):
			result[x*x + y*y + z*z + x*y + y*z + z*x] += 1
				
for i in range(1, n + 1):
	print(result[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(n+1)]
for x in range(1,100):
  for y in range(1,100):
    for z in range(1,100):
      s = x**2 + y**2 + z**2 + x*y + y*z + z*x
      if s <= n:
        ans[s] += 1
for i in range(1,n+1):
  print(ans[i])

Solution (Python):
from itertools import product

N = int(input())

memo = [0]*N

for x,y,z in product(range(1,100),repeat=3):
    t = x*x+y*y+z*z+x*y+y*z+z*x
    if 0 < t <= N:
        memo[t-1] += 1

print(*memo,sep='\n')

Solution (Python):
N = int(input())
X = [0] * (N + 1)
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            a = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + i * k
            if a <= N:
                X[a] += 1
for a in X[1:]:
    print(a)

Solution (Python):
def solve():
  N = int(input())
  ans = [0]*N
  for x in range(1,101):
    for y in range(1,101):
      for z in range(1,101):
        cnt = x*x+y*y+z*z+x*y+y*z+z*x
        if cnt<=N:
          ans[cnt-1] += 1
  return ans
print(*solve(),sep='\n')

Solution (Python):

import sys
input = sys.stdin.readline

n = int(input())

ans = [0] * (10**4 + 1)
for x in range(1,101):
    for y in range(1, 101):
        for z in range(1, 101):
            val = x*x + y*y + z*z + x*y + y*z + z*x
            if val <= 10**4:
                ans[val] += 1

for i in range(1, n+1):
    print(ans[i])

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n = int(input())

ans = [0]*10**5

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            ans[i**2 + j**2 + k**2 + i*j + j*k + k*i] += 1
print(*ans[1:n + 1], sep='\n')

Solution (Python):
n = int(input())

ans = [0]*(n+1)

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            val = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if 1 <= val and val <= n:
                ans[val] += 1

for i in range(n):
    print(ans[i+1])

Solution (Python):
N = int(input())
X = [0] * (N + 1)
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            a = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + i * k
            if a <= N:
                X[a] += 1
for a in X[1:]:
    print(a)

Solution (Python):
n = int(input())
lst = [0 for _ in range(n)]

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            num = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + i * k
            try:
                lst[num - 1] += 1
            except IndexError:
                pass
for num in lst:
    print(num)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache





MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b: a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




N = I()
dic = DD(int)

for a in range(1,101):
  for b in range(1,101):
    for c in range(1,101):
      dic[a**2+b**2+c**2+a*b+b*c+c*a] += 1
for i in range(N):
  print(dic[i+1])

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    N = 10000
    f = [0]*(N+1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                s = x**2+y**2+z**2+x*y+y*z+z*x
                if s <= N:
                    f[s] += 1
    for i in range(1,n+1):
        print(f[i])
    return


if __name__ == "__main__":
    solve()

Solution (Python):
n = int(input())

ans = [0]*n

for x in range(1,int(n**0.5)):
    for y in range(1,int(n**0.5)):
        for z in range(1,int(n**0.5)):
            left = x*x + y*y + z*z + x*y + y*z + z*x
            if left<=n:
                ans[left-1] += 1

print("\n".join(map(str,ans)))

Solution (Python):
n = int(input())
f = [0 for _ in range(10**4+1)]

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            k = x * x + y * y + z * z + x * y + y * z + z * x
            if k <= 10**4:
                f[k] +=1

for i in range(1, n+1):
    print(f[i])

Solution (Python):
n = int(input())
ans = [0]*(10001)
for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1, 101):
      key = x**2+y**2+z**2+x*y+y*z+z*x
      if key <= 10000:
        ans[key] += 1
for i in range(1, n+1):
  print(ans[i])

Solution (Python):
import sys
input = sys.stdin.readline


N=int(input())

ANS=[0]*(10**5+1)

for x in range(1,10**2+1):
    for y in range(1,10**2+1):
        for z in range(1,10**2+1):
            ANS[x*x+y*y+z*z+x*y+y*z+z*x]+=1

print(*ANS[1:N+1])

Solution (Python):
n = int(input())

A = [0] * (n+1)

for i in range(1, 105):
    for j in range(1,105):
        for k in range(1,105):
            l = i**2+j**2+k**2+i*j+j*k+k*i
            if l <= n:
                A[l] += 1
for i in range(1, n+1):
    print(A[i])

Solution (Python):
n = int(input())
ans = [0] * (10**5)
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            ans[i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i-1] += 1
for i in range(n):
    print(ans[i])

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations,product

from heapq import heapify,heappop,heappush


from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    N = int(input())
    
    
    
    
    l=[0]*N
    for x in range(1,101):
        for y in range(1,101):
            for z in range(1,101):
                tot=x**2+y**2+z**2+x*y+y*z+z*x
                if tot<=N:
                    l[tot-1]+=1
    for i in range(N):
        print(l[i])






if __name__ == "__main__":
    main()

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    F = [0] * (N + 1)
    for x in range(1, 101):
        X = x ** 2
        for y in range(1, 101):
            Y = y ** 2
            for z in range(1, 101):
                a = X + Y + z ** 2 + x * y + y * z + z * x
                if a <= N: F[a] += 1
    print(*F[1:], sep="\n")
                

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
N = int(input())
res = [0 for _ in range(N)]

for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            k = x**2 + y**2 + z**2 + x * y + y * z + z * x
            if k <= N:
                res[k - 1] += 1

print(*res, sep='\n')

Solution (Python):
import sys
input = sys.stdin.readline
from collections import defaultdict
N = int(input())

ans = defaultdict(int)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            t = x**2 + y**2 + z**2 + x*y + y*z + z * x
            ans[t] += 1

for i in range(1,N+1):
    print(ans[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(n+1)]

for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      a = x**2+y**2+z**2+x*y+y*z+z*x
      if a <= n:
        ans[a] += 1
for i in range(1,n+1):
  print(ans[i])

Solution (Python):
import sys
input = sys.stdin.readline


N=int(input())

ANS=[0]*(10**5+1)

for x in range(1,10**2+1):
    for y in range(1,10**2+1):
        for z in range(1,10**2+1):
            ANS[x*x+y*y+z*z+x*y+y*z+z*x]+=1

print(*ANS[1:N+1])

Solution (Python):
f = [0] * (10 ** 4 + 1)
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            w = x * x + y * y + z * z + x * y + y * z + z * x
            if w < len(f):
                f[w] += 1
n = int(input())
for i in range(1, n + 1):
    print(f[i])

Solution (Python):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    ans=[0]*(N+1)
    
    for x in range(1,101):
        for y in range(1,101):
            for z in range(1,101):
                k=x**2+y**2+z**2+x*y+y*z+z*x
                if k<=N:
                    ans[k]+=1
                    
                    
    for i in range(1,N+1):
        print(ans[i])

main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.buffer.readline()[:-1]
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
up = int(N**(1/2))+1
ans = [0]*(N+1)
for x in range(1, up):
    for y in range(1, up):
        for z in range(1, up):
            tmp = x**2+y**2+z**2+x*y+y*z+z*x
            if tmp <= N:
                ans[tmp] += 1
print(*ans[1:], sep="\n")

Solution (Python):
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    m = 100
    l = [0]*10**5
    for i in range(1, m):
        for j in range(1, m):
            for k in range(1, m):
                l[i**2 + j**2 + k**2 + i*j + j*k + k*i] += 1
    n = ni()
    prn(l[1:n+1])
    return

solve()

Solution (Python):
N=int(input())
X=[0]*10001
for i in range(1,102):
  for j in range(1,102):
    for k in range(1,102):
      if i*i+j*j+k*k+i*j+j*k+k*i<10001:
        X[i*i+j*j+k*k+i*j+j*k+k*i]+=1
for i in range(N):
  print(X[i+1])

Solution (Python):
N = int(input())
ans = [0] * (N+1)

for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n = x*x + y*y + z*z + x*y + y*z + z*x
            if n <= N:
                ans[n] += 1
print(*ans[1:], sep='\n')

Solution (Python):
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    m = 100
    l = [0]*10**5
    for i in range(1, m):
        for j in range(1, m):
            for k in range(1, m):
                l[i**2 + j**2 + k**2 + i*j + j*k + k*i] += 1
    n = ni()
    prn(l[1:n+1])
    return

solve()

Solution (Python):
N=int(input())
L=[0 for i in range(10**4+1)]
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            n=x*x+y*y+z*z+x*y+y*z+z*x
            if n<=10**4:
                L[n]+=1
for i in range(1,N+1):
    print(L[i])

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

C = collections.Counter()
n = int(input())
C0 = 10**2+10
for i in range(1,C0):
  for j in range(1,C0):
    for k in range(1,C0):
      C[i**2+j**2+k**2+i*j+j*k+k*i] += 1
for i in range(1,n+1):
  print(C[i])

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    ans = [0] * (N+1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                val = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if 1 <= val <= N:
                    ans[val] += 1
    for i in range(1, N+1):
        print(ans[i])


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
ans=[0]*n
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      if x*x+y*y+z*z+x*y+y*z+z*x>n:break
      ans[x*x+y*y+z*z+x*y+y*z+z*x-1]+=1
print(*ans)