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):
n=int(input())
ans=[0 for _ in range(100050)]
for i in range(1,105):
  for j in range(1,105):
      for k in range(1,105):
        v=i*i+j*j+k*k+i*j+j*k+k*i
        if v<10050:
          ans[v]+=1

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

Solution (Python):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()
ans = [0 for i in range(n)]

tmp=0
for i in range(1,math.ceil(math.sqrt(n))):
    for j in range(1,math.ceil(math.sqrt(n))):
        for k in range(1,math.ceil(math.sqrt(n))):
            tmp = i**2+j**2+k**2+i*j+j*k+k*i
            if tmp <=n:
                ans[tmp-1]+=1

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

Solution (Python):

def solve():
    N = int(input())
    A = [0] * (N + 1)
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                s = x * x + y * y + z * z + x * y + x * z + y * z
                if s <= N:
                    A[s] += 1
    for i in range(1, N + 1):
        print(A[i])

solve()

Solution (Python):
from sys import stdin,stdout                           
import math                                            
import heapq                                           
                                                       
t = 1                                                  
def aint():                                            
	return int(input().strip())                        
def lint():                                            
	return list(map(int,input().split()))              
def fint():                                            
	return list(map(int,stdin.readline().split()))     
                                                       

l=[0]*100000
for x in range(1,100):
	for y in range(1,100):
		for z in range(1,100):
			l[x*x+y*y+z*z+x*y+x*z+y*z]+=1
def main():
	n=aint()
	for i in range(1,n+1):
		print(l[i])
	return




for i in range(t):                                     
	
	main()

Solution (Python):
n = int(input())
ans = [0 for _ in range(10001)]
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i+j*j+k*k+i*j+j*k+k*i
            if v<=10000:
                ans[v]+=1
 
for i in range(n):
    print(ans[i+1])

Solution (Python):
n=int(input())
Ans=[0]*n
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            num=x**2+y**2+z**2+x*y+y*z+z*x
            if num<=n:
                Ans[num-1]+=1
print(*Ans,sep='\n')

Solution (Python):
n = int(input())
a = [0] * 10**5
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] += 1
for i in range(1, n + 1):
	print(a[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(10001)]
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i+j*j+k*k+i*j+j*k+k*i
            if v<=10000:
                ans[v]+=1

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from collections import defaultdict 
def main():
    N = int(input())
    ans = defaultdict(int)
    for i in range(1, 110):
        for j in range(1, 110):
            for k in range(1, 110):
                v = i*i+j*j+k*k+i*j+j*k+k*i
                ans[v] += 1
    for i in range(1, N+1):
        print(ans[i])
if __name__ == '__main__':
    main()

Solution (Python):
import sys,math

DEBUG=False
if DEBUG:
    f=open("202007_2nd/C_input.txt")
else:
    f=sys.stdin


N=int(f.readline().strip())
ans=[0 for _ in range(N)]
I=int(math.sqrt(N))
for __ in range(I):
    A2=N-((__+1)**2)
    if A2<=0:
        break
    I2=int(math.sqrt(A2))
    for ___ in range(I2):
        A3=A2-((___+1)**2)
        if A3<=0:
            break
        I3=int(math.sqrt(A3))
        for ____ in range(I3):
            tmp=((__+___+2)**2)+((___+____+2)**2)+((__+____+2)**2)
            if tmp<=2*N:
                ans[int(tmp/2)-1]+=1
            else:
                break
for _ in range(N):
    print(ans[_])
f.close()

Solution (Python):
n = int(input())
arr = [0] * (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*z + y*z + x*y
      if a<= n:
        arr[a] += 1
        
for i in range(1,n+1):
    print(arr[i])

Solution (Python):
import sys
import math
import itertools




N = int(input())

count = []
for i in range(N):
    count.append(0)

max = min(int(math.sqrt(N)), int(N/2))
l = []

for i in range(1, max+1):
    l.append(i)

h = itertools.combinations_with_replacement(l, 3)


for i,j,k in h:
    n = (i+j+k)**2 - i*j - j*k - k*i
    

    if(n <=N):
        if(i==j==k):
            count[n-1]+=1
        elif(i==j or j==k or i == k):
            count[n-1]+=3
        else:
            count[n-1]+=6


for c in count:
    print(c)

Solution (Python):
N = int(input())
ans = [0] * (N + 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):
            n = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if N < n:
                continue
            ans[n] += 1
print(*ans[1:], sep='\n')

Solution (Python):


N = int(input())

ANS = [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 + k*i
            if a <= N:
                ANS[a] += 1

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

Solution (Python):
n=int(input())
N=10**4+20;M=103
a=[0 for _ in range(N)]
for x in range(1,M):
    for y in range(1,M):
        for z in range(1,M):
            res=x*x+y*y+z*z+x*y+y*z+z*x;
            if res<N:a[res]+=1
for i in range(n):
    print(a[i+1])

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

Solution (Python):
n = int(input())
a = [0 for _ in range(n+1)]
for i in range(1,n+1):
  if i*i>n:
    break
  for j in range(1,n+1):
    if i*i + j*j +i*j > n:
      break
    for k in range(1,n+1):
      tmp = i*i + j*j + k*k + i*j + j*k + k*i
      if tmp<=n:
        a[tmp]+=1
      else:
        break
for i in range(1,n+1):
  print(a[i])

Solution (Python):
if __name__ == '__main__':
    
    from sys import stdin
    
    
    
    from copy import deepcopy
    
    from numpy import random as np_random
    
    import random
    input = stdin.readline

    ans_list = [0]*60001
    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x**2+y**2+z**2+x*y+y*z+z*x
                ans_list[n] += 1

    n = int(input())
    for i in range(1, n+1):
        print(ans_list[i])

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

l = {}
for i in range(1, n+1):
    l[i] = 0

for x in range(1, min(101, n)):
    for y in range(1, min(101, n)):
        for z in range(1, min(101, n)):
            m = (x + y + z) ** 2 - (x*y + y*z + z*x)
            if m <= n:
                l[m] += 1
for i in range(1, n+1):
    print(l[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):
      v = x * x + y * y + z * z  + x * y + y * z + z * x
      if v > N:
        continue
      ans[v - 1] += 1

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

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

max_x=int(N**0.5)
ans_list=[0]*N

for x in range(1,max_x):
    for y in range(1,max_x):
        for z in range(1,max_x):
            s=x**2+y**2+z**2+x*y+y*z+z*x
            if s<=N:
                ans_list[s-1]+=1
                
for i in range(N):
    print(ans_list[i])

Solution (Python):
n = int(input())
a = [0 for _ in range(n+1)]
for i in range(1,n+1):
  if i*i>n:
    break
  for j in range(1,n+1):
    if i*i + j*j +i*j > n:
      break
    for k in range(1,n+1):
      tmp = i*i + j*j + k*k + i*j + j*k + k*i
      if tmp<=n:
        a[tmp]+=1
      else:
        break
for i in range(1,n+1):
  print(a[i])

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

ans = [0 for _ in range(10050)]

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    from collections import Counter
    n = int(readline())
    count = Counter()

    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
                count[a] += 1

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()

    a = [0] * n

    r = 0
    for x in range(1, 100):
        t = x ** 2
        if t > n:
            break

        for y in range(1, 100):
            u = t + y ** 2 + x * y
            if u > n:
                break

            for z in range(1, 100):
                v = u + z ** 2 + y * z + z * x
                if v > n:
                    break

                a[v-1] += 1

    return JA(a, "\n")


print(main())

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



def f(x,y,z):
    return x**2 + y**2 +z**2 +x*y+y*z+z*x
dic={}
for i in range(1,n+1):
    dic[i]=0
for x in range(1,101):
    for y in range(1,100):
        for z in range(1,100):
            if f(x,y,z)<=n:
                dic[f(x,y,z)]=dic.get(f(x,y,z),0)+1
for i in range(1,n+1):
    print(dic[i])

Solution (Python):
N = int(input())
a = [0]*10050
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i+j*j+k*k+i*j+i*k+j*k
            if v <= 10000:
                a[v-1] += 1

for i in range(N):
    print(a[i])

Solution (Python):
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1, 105):
  for j in range(1, 105):
    for k in range(1, 105):
      v = i * i + j * j + k * k + i * j + j * k + k * i
      if v < 10050:
        ans[v] += 1

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

Solution (Python):
N = int(input())
l = [0]*N
upper = round((N-1)**0.5-1)
for x in range(1, upper+1):
    for y in range(1, upper + 1):
        for z in range(1, upper + 1):
            tmp = x**2+y**2+z**2+x*y+y*z+z*x
            if tmp < N+1:
                l[tmp-1]+=1
for x in l:
    print(x)

Solution (Python):
import sys
from collections import defaultdict


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

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


def main():
    N = int(input())
    A = defaultdict(int)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
                A[tmp] += 1

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


if __name__ == "__main__":
    main()

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
dp = [0] * (500000)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            pe = x**2 + y**2 + z**2 + x*y + y*z + z*x
            dp[pe] += 1
print(*dp[1:n+1],sep='\n')

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):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a > n: continue
            ans[a-1] += 1
for i in ans: print(i)

Solution (Python):
N = int(input())
C = {i:0 for i in range(1,N+1)}
for x in range(1,142):
    for y in range(1,142):
        for z in range(1,142):
            a = (x+y)**2+(y+z)**2+(z+x)**2
            if a%2==0 and a//2<=N:
                C[a//2] += 1
for i in range(1,N+1):
    print(C[i])

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):
        left = x*x+y*y+z*z+x*y+y*z+z*x
        if left<=N:
          ans[left-1] += 1
  return ans
print(*solve(),sep='\n')

Solution (Python):



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

    n = int(input())
    ans = [0 for _ in range(10 ** 6 + 2000)]
    candidate = 110

    for x in range(1, candidate + 1):
        for y in range(1, candidate + 1):
            for z in range(1, candidate + 1):
                total = 0
                total += (x ** 2) + (y ** 2) + (z ** 2)
                total += (x * y) + (y * z) + (z * x)

                if total < (10 ** 6 + 2000):
                    ans[total] += 1

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


if __name__ == '__main__':
    main()

Solution (Python):



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

    n = int(input())
    ans = [0 for _ in range(10 ** 6 + 2000)]
    candidate = 110

    for x in range(1, candidate + 1):
        for y in range(1, candidate + 1):
            for z in range(1, candidate + 1):
                total = 0
                total += (x ** 2) + (y ** 2) + (z ** 2)
                total += (x * y) + (y * z) + (z * x)

                if total < (10 ** 6 + 2000):
                    ans[total] += 1

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


if __name__ == '__main__':
    main()

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

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):
      F=x**2 + y**2 + z**2 + x*y + y*z + z*x
      if(N>=F):
        ans[F-1] += 1
        
for i in ans:
  print(i)

Solution (Python):
def foo(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

N = int(input())

A = [0 for i in range(10050)]

for i in range(1,105):
    for j in range(1,105):
        for k in range(1,105):
            tmp = foo(i,j,k)
            if tmp < 10050:
                A[tmp] += 1

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

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

ans = [0]*(n+1)

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

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

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

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

Solution (Python):
import math

n = int(input())
ans = [0]*n
root = n ** 0.5

for x in range(1, math.floor(root) + 1):
    for y in range(1, math.floor(root) + 1):
        for z in range(1, math.floor(root) + 1):
            result = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if result <= n:
                ans[result - 1] += 1

for num in ans:
    print(num)

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

ans = [0] * (N+1)
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            n = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n < (N+1):
                ans[n] += 1

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

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

cnt = [0] * (6 * 10000 + 1)

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

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N = int(input())

cnt = [0] * 10010

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            calc = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if calc <= N:
                cnt[calc] += 1

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

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

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

cnt = [set() for i in range(n+1)]

def f(x, y, z):
    return x*x+y*y+z*z+x*y+y*z+x*z

for x in range(1, n+1):
    if f(x,1,1) > n: break
    for y in range(1, n+1):
        if f(x,y,1) > n: break
        for z in range(1, n+1):
            t = f(x,y,z)
            if t > n: break
            cnt[t].add((x,y,z))

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

Solution (Python):
def solve(n):
    D = {k: 0 for k in range(1, n+1)}
    m = int(n**0.5)
    for x in range(1, m+1):
        for y in range(1, m+1):
            for z in range(1, m+1):
                k = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if k <= n:
                    D[k] += 1
                else:
                    break
    for k in range(1, n+1):
        print(D[k])

n = int(input())
solve(n)

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

a=[0]*10**4

for x in range(1,100):
     for y in range(1,100):
         for z in range(1,100):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             if n<=10000:
                 a[n-1]+=1

for n in range(N):
    print(a[n])

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

Solution (Python):
n = int(input())
l = [0]*(n+1)
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            ans = x**2+y**2+z**2+x*y+x*z+y*z
            if(ans>n):
                continue
            l[ans] += 1

print(*l[1:])

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

Solution (Python):
N = int(input())
f = [0]*N
for x in range(1,100):
  for y in range(1,100):
    for z in range(1,100):
      n=x**2+y**2+z**2+x*y+y*z+z*x
      if n<=N:
        f[n-1]+=1
print(*f,sep="\n")

Solution (Python):
import math
import numpy as np

def  XYZTriplets():

    num = int(input())
    
    list_num = []
    
    count = [0]*num
    
    for i in range(1, num+1):
        list_num.append(i)

    for x in range(1, int(math.sqrt(num))):
        for y in range(1, int(math.sqrt(num))):
            for z in range(1, int(math.sqrt(num))):
                
                function = x*x + y*y + z*z + x*y + y*z + z*x
                
                if function <= num and function > 0:
                    count[function-1] = count[function-1] + 1
 
    for i in range(0, num):
        print(count[i])
        

if __name__ == '__main__':
    XYZTriplets()

Solution (Python):
n = int(input())
ans = [0] * 10050

for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):
            zzz = (x + y + z) ** 2 - x * y - y * z - x * z
            if zzz < 10050:
                ans[zzz] += 1

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

Solution (Python):
import math


def main():
    N = int(input())
    sqrt = int(math.sqrt(N))
    ans = [0] * (N+1)
    for x in range(1, sqrt+1):
        for y in range(1, sqrt+1):
            for z in range(1, sqrt+1):
                tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if tmp <= N:
                    ans[tmp] += 1
    for i in range(1, N+1):
        print(ans[i])


if __name__ == "__main__":
    main()

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

cnt = [0] * 10001

for i in range(1, 100):
	for j in range(1, 100):
		for k in range(1, 100):
			x = i*i + j*j + k*k + i*j + j*k + i*k
			if(x <= 10000):
				cnt[x]+=1

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

Solution (Python):
f = [0] * 10001
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            n = x * x + y * y + z * z + x * y + y * z + z * x
            if n > 10000:
                break
            f[n] += 1

N = int(input())

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

Solution (Python):
N=int(input())
r=[0]*10000
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            v = i*i + j*j + k*k + i*j + i*k + k*j
            if v <= 10000:
                r[v-1] += 1
for i in range(N):
    print(r[i])

Solution (Python):
N=int(input())
r=[0]*10000
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            v = i*i + j*j + k*k + i*j + i*k + k*j
            if v <= 10000:
                r[v-1] += 1
for i in range(N):
    print(r[i])

Solution (Python):
n=int(input())
ans = [0 for _ in range(10050)]
for i in range(1,105):
	for j in range(1,105):
		for k in range(1,105):
			v = i*i+j*j+k*k+i*j+j*k+k*i;
			if v<10050:
				ans[v]+=1

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

Solution (Python):
n = int(input())
ans = [0 for _ in range(n + 1)]
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            v = i*i + j*j + k*k +i*k +k*j+j*i
            if v < n+1:
                ans[int(v)] += 1
for i in range(n):
    print(ans[i+1])

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

cnt = [0] * (10 ** 4 + 1)

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

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

Solution (Python):
n = int(input())
M = int(n**(0.5))
ans = [0]*(n+1)
for x in range(1,M+1):
    for y in range(1,10**2):
        for z in range(1,10**2):
            if x**2+y**2+z**2+x*y+y*z+z*x > n:
                break
            ans[x**2+y**2+z**2+x*y+y*z+z*x] += 1
        if x**2+y**2 > n:
            break
for i in range(n):
    print(ans[i+1])

Solution (Python):
"""
    Satwik_Tiwari ;) .
    12th july , 2020  - Sunday
"""



from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb 
from itertools import permutations as permutate
from bisect import bisect_left as bl


from bisect import bisect_right as br
from bisect import bisect





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)






mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") 
def out(var): sys.stdout.write(str(var))  
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())

def zerolist(n): return [0]*n
def nextline(): out("\n")  
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True



def f(x,y,z):
    return ((x**2)+(y**2)+(z**2)+(x*y)+(x*z)+(y*z))

def solve():
    n = int(inp())
    

    arr = [0]*(n+1+1)
    for i in range(1,101):
        for j in range(1,101):
            for k in range(1,101):
                
                if(f(i,j,k) <= n):
                    arr[f(i,j,k)] +=1
                else:
                    break
    for i in range(n):
        print(arr[i+1])

testcase(1)

Solution (Python):
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):
            num = x * x + y * y + z * z + x * y + y * z + z * x
            if num <= N:
                ans[num] = ans[num] + 1

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

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


ans_list=[0]*N

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_list[s-1]+=1
            
   
for i in range(N):
   print(ans_list[i])

Solution (Python):
import math

n = int(input())
nn = int(math.sqrt(n))+1

ans = [0] * n
for x in range(1,nn):
    for y in range(1,nn):
        for z in range(1,nn):
            f = x**2+y**2+z**2+x*y+y*z+z*x
            if f <= n:
                ans[f-1] += 1

for a in ans:
    print(a)

Solution (Python):
import sys,collections; input = lambda : sys.stdin.readline()
exec("try:sys.stdin=pen('input.txt','r')\nexcept:pass")
n = int(input())
ans = [0]*100005
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 < 100005:
                ans[v] += 1
for i in range(n):
    print(ans[i+1])

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

result = [0]*(N+1)

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

Solution (Python):
n = int(input())
rates = [1,1,3,6]
cnt = [0]*10001
def g(x,y,z):
    return x**2 + y**2 + z**2 + x*y + x*z + y*z

for x in range(1,101):
    for y in range(x,101):
        for z in range(y,101):
            rate = rates[len(set([x,y,z]))]
            gv = g(x,y,z)
            if gv < 10001:
                cnt[gv]+=rate
for i in range(1,n+1):
    print(cnt[i])

Solution (Python):
import math
n = int(input())
t = [0] * (n + 1)
m = math.floor(math.sqrt(n))

for i in range(1,m):
    for j in range(1,m):
        for k in range(1,m):
            p = i*i+j*j+k*k+i*j+j*k+i*k
            if p <= n:
                t[p] += 1

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

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

ans = [0] * (N+1)
for a in range(1, 105):
  if a*a > N :
    break
  for b in range(1, 105):
    if a*a + b*b > N:
      break      
    for c in range(1, 105):
      if a*a + b*b + c*c + a*b + b*c + c*a > N:
        break
      ans[a*a + b*b + c*c + a*b + b*c + c*a] += 1

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