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):
import sys
input = sys.stdin.readline
import math

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

Solution (Python):
import math

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

n = int(input())
fs = [0] * n

lim = math.floor(math.sqrt(n))
rng = range(1, lim)

for x in rng:
  for y in rng:
    for z in rng:
      v = f(x, y, z)
      if v <= n:
      	fs[v - 1] += 1
      
for i in range(n):
  print(fs[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):
def II(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
N=II()

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

Solution (Python):
from itertools import product
n = int(input())

nums = [0]*(n+1)
for i in product(range(1, int(n**0.5)+1),repeat=3):
  t = i[0]**2 + i[1]**2 + i[2]**2 + i[0]*i[1] + i[1]*i[2] + i[0]*i[2]
  if t <= n: nums[t] += 1

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

Solution (Python):
def II(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
N=II()
ans=[0 for _ in range(10050)]
for i in range(1,105):
  for j in range(1,105):
    for k in range(1,105):
      n=i*i+j*j+k*k+i*j+j*k+k*i
      if n<10050:
        ans[n]+=1
for i in range(1,N+1):
  print(ans[i])

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

Solution (Python):
n = int(input())
a = [0 for _ in range(101**3+1)]
for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      p = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if p <= 10010:
        a[p] += 1
for i in range(1,n+1):
  print(a[i])

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

Solution (Python):
def main():
    n = int(input())
    res = [0]*(n+1)

    for i in range(1,100):
        for j in range(1,100):
            for k in range(1,100):
                if(i**2 + j**2 + k**2 +i*j+j*k + k*i<=n):
                    res[i**2 + j**2 + k**2 +i*j+j*k + k*i]+=1
                    
    for i in range(1,n+1):
        print(res[i])
if __name__ == '__main__':
    main()

Solution (Python):
import math

n = int(input())

cnts = [0] * (n + 1)
sn = int(math.sqrt(n)) + 1
for x in range(1, sn + 1):
  for y in range(1, sn + 1):
    for z in range(1, sn + 1):
      g = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
      if 1 <= g <= n:
        cnts[g] += 1

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

Solution (Python):
import math
n=int(input())
ans=[0]*n
for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            num=(i+j+k)**2-(i*j+j*k+k*i)
            if num<=n:
                ans[num-1]+=1
for i in ans:
    print(i)

Solution (Python):
from math import sqrt


def check(i, j, k):
    cnt = set([i, j, k])
    if len(cnt) == 1:
        return 1
    if len(cnt) == 2:
        return 3
    if len(cnt) == 3:
        return 6


N = int(input())
ans = [0] * N

R = int(sqrt(N))
for x in range(1, R + 1):
    for y in range(x, R + 1):
        for z in range(y, R + 1):
            f = (x ** 2) + (y ** 2) + (z ** 2) + (x * y) + (y * z) + (z * x)
            if f <= N:
                ans[f - 1] += check(x, y, z)
print(*ans, sep='\n')

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

for i in range(1,101):
    for j in range(1,101):
        for k in range(1,101):
            n = i*i + j*j + k*k + i*j + j*k + k*i
            if n <= 10**4:
                ans[n] += 1

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

Solution (Python):
from itertools import permutations
N=int(input())
ans=[0]*(10**6)
for x in range(1,N+1):
    if x**2>N:
        break
    for y in range(1,N+1):
        if x**2+y**2>N:
            break
        for z in range(1,N+1):
            if x**2+y**2+z**2>N:
                break
            else:
                kari=[x,y,z]
                
                if x**2+y**2+z**2+x*y+y*z+z*x<=10**5:
                    ans[x**2+y**2+z**2+x*y+y*z+z*x-1]+=1
                    
for i in range(N):
    print(ans[i])

Solution (Python):
def F(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x
dic = [0]*(10**4+1)

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

N = int(input())
for x in range(1,N+1):
    print(dic[x])

Solution (Python):
n = int(input())
ans = [0] * (n + 1)
a = [1, 3, 6]
for x in range(1, int(n**0.5) + 1):
    for y in range(x, int(n**0.5) + 1):
        for z in range(y, int(n**0.5) + 1):
            v = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if v <= n:
                ans[v] += a[len(set([x, y, z])) - 1]
print(*ans[1:], sep='\n')

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):
      val = x * x + y * y + z * z + x * y + y * z + z * x
      if val < len(ans):
        ans[val] += 1

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

Solution (Python):







import io
import sys
import math

def format_multi_line_answer(lst):
    ans = ""
    for y in lst:
        ans += f"{y}\n"
    return ans


def f(n):
    v_lst = [0] * (n+1)
    for x in range(1,105):  
        for y in range(1,105):
            for z in range(1,105):
                
                
                v = ff(x,y,z) 
                if v <= n:  
                    v_lst[v] += 1
    return v_lst

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

def solve(n):
    
    ans_l = []
    
    
    v_lst = f(n)

    
    for v in v_lst[1:]:
        ans_l.append(v)

    return format_multi_line_answer(ans_l)

def main():
    
    n = int(input())
    
    ans = str( solve(n) )
    
    
    print(ans)
    return ans
        

_DEB = 0   

_INPUT = """\
"""+str(10000)

_EXPECTED = """\
0
0
0
0
0
1
0
0
0
0
3
0
0
0
0
0
3
3
0
0


"""

def logd(str):
    """usage:
    if _DEB: logd(f"{str}")
    """
    if _DEB: print(f"[deb] {str}")


if __name__ == "__main__":
    if _DEB:
        sys.stdin = io.StringIO(_INPUT)
        print("!! Debug Mode !!")

    ans = main()

    if _DEB:
        print()
        if _EXPECTED.strip() == ans.strip(): print("!! Success !!")
        else: print(f"!! Failed... !!\nANSWER:   {ans}\nExpected: {_EXPECTED}")

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

for i in range(1,10**2+10):
    for j in range(1, 10**2+10):
        for k in range(1, 10**2+10):
            v = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if v < 10**4+10:
                ans[v]+=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 ** 4 + 1)
for x in range(1,int(N ** (1 / 2))):
    for y in range(1, int(N ** (1 / 2))):
        for z in range(1, int(N ** (1 / 2))):
            v = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if v <= N:
                ans[v] += 1

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

Solution (Python):


import collections
import sys
input=sys.stdin.readline

n=int(input())
ans=[0]*n
tmp=[]
for x in range(1,int(n**0.5)+1):
    for y in range(1,int(n**0.5)+1):
        for z in range(1,int(n**0.5)+1):
            tmp.append(x**2+y**2+z**2+x*y+y*z+z*x)

cnt=collections.Counter(tmp)
for i in range(1,n+1):
    print(cnt[i])

Solution (Python):
N=int(input());a=[0]*10_001;X=Y=Z=range(1,101)
for x in X:
    for y in Y:
        for z in Z:
            if (n:=x*x+y*y+z*z+x*y+y*z+z*x)<N+1:a[n-1]+=1
print(*a[:N],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):
      n = pow(x,2) + pow(y,2) + pow(z,2) + x*y + y*z + z*x
      if n <= N:
        ans[n] += 1
        
for i in range(1,N+1):
  print(ans[i])

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

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

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            m = ((i ** 2) + (j ** 2) + (k ** 2) + (i * j) + (j * k) + (k * i))
            if m < 10001:
                ans[m-1] += 1

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

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N = int(readline())

    f = [0] * (N+1)
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                tmp = x*x + y*y + z*z + x*y + y*z + z*x
                if tmp <= N:
                    f[tmp] += 1
    
    print("\n".join(map(str, f[1:])))


if __name__ == "__main__":
    main()

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N = int(readline())

    f = [0] * (N+1)
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                tmp = x*x + y*y + z*z + x*y + y*z + z*x
                if tmp <= N:
                    f[tmp] += 1
    
    print("\n".join(map(str, f[1:])))


if __name__ == "__main__":
    main()

Solution (Python):
from math import sqrt

n = int(input())
maximum = int(sqrt(n))
f = [0] * (n + 1)

for x in range(1, maximum):
  for y in range(1, maximum):
    for z in range(1, maximum):
      value = x*x + y*y + z*z + x*y + y*z + z*x
      if value <= n:
        f[value] += 1
for f_i in f[1:]:
  print(f_i)

Solution (Python):
N = int(input())
ans = [0 for _ in range(1,10101)]

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+1:
                ans[n-1] += 1

print(*ans[:N],sep='\n')

Solution (Python):
def main():
    N = int(input())
    d = [0 for _ in range(N)]
    r = 100
    ii = 0
    for i in range(1, r):
        ii += 2* i - 1
        for j in range(1, i + 1):
            s = i + j
            c = ii + s * j
            l = 6
            if i == j:
                l = 3
            if c + 1 + s > N:
                break
            for k in range(1, j + 1):
                c += 2* k - 1 + s
                if c <= N:
                    if j == k:
                        l = 3
                        if i == k:
                            l = 1
                    d[c - 1] += l
                else:
                    break
    print(*d, sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
cnt = [0]*(n+1)

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):
      v = (i**2)+(j**2)+(k**2)+i*j+j*k+k*i
      if v<=n:
        cnt[v] += 1
for i in range(1,n+1):
  print(cnt[i])

Solution (Python):
n = int(input())
ans = [0] * 100000
for x in range(1,101):
  for y in range(1,101):
    for z in range(1,101):
      idx = x**2 + y**2 + z**2 + x*y + y*z + z*x
      ans[idx] += 1
for i in ans[1:n+1]:
  print(i)

Solution (Python):
from math import sqrt
n=int(input())
ans=[0]*n
for x in range(1,int(sqrt(n))+10):
    for y in range(1,int(sqrt(n))+10):
        for z in range(1,int(sqrt(n)+10)):
            v=x**2+y**2+z**2+x*y+y*z+z*x
            if v<=n:
                ans[v-1]+=1
for a in ans:
    print(a)

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

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N = int(readline())

    f = [0] * (N+1)
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                tmp = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if tmp <= N:
                    f[tmp] += 1
    
    print("\n".join(map(str, f[1:])))


if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
cnt = [0]*(10**4+50)

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<10**4+50:
        cnt[v] += 1
for i in range(1,n+1):
  print(cnt[i])

Solution (Python):
import sys
from itertools import permutations, combinations


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


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    f = [0] * (n + 1)

    i = 1
    while g(i, i, i) <= n:
        f[g(i, i, i)] += 1
        i += 1

    for p in permutations(range(1, 101), 2):
        if g(p[0], p[0], p[1]) <= n:
            f[g(p[0], p[0], p[1])] += 3

    for p in combinations(range(1, 101), 3):
        if g(p[0], p[1], p[2]) <= n:
            f[g(p[0], p[1], p[2])] += 6

    for e in f[1:]:
        print(e)


if __name__ == "__main__":
    main()

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

Solution (Python):
from math import sqrt
n = int(input())

n_cnt = [0]*n

for x in range(1, int(sqrt(2*n))+1):
    for y in range(1, int(sqrt(2*n))+1):
        for z in range(1, int(sqrt(2*n))+1):
            t = (x+y)**2 + (y+z)**2 + (z+x)**2
            if t % 2 == 0 and t // 2 - 1 < n:
                n_cnt[t // 2 - 1] += 1


for i in range(n):
    print(n_cnt[i])

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

Solution (Python):
n = int(input())
ret = [0 for _ in range(1,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):
	for y in range(1,n+1):
		for z in range(1,n+1):
			if f(x,y,z) > n:
				z = 1
				break
			ret[f(x,y,z)-1] += 1
		if f(x,y,z) > n:
			y = 1
			break
	if f(x,y,z) > n:
		x = 1
		break

for i in ret:
	print(i)

Solution (Python):
def main():
    N = int(input())
    d = [0] * N
    r= 100
    for i in range(1, r):
        ii = i * i
        for j in range(1, i + 1):
            iji = ii + j * j + i * j
            l =6
            if iji + 1 + i + j > N:
                break
            for k in range(1, j + 1):
                c = iji + k * k + (i + j) * k
                if c <= N:
                    if i == j or j == k:
                        l = 3
                        if i == k:
                            l = 1
                    d[c - 1] += l
                else:
                    break
    print(*d, sep="\n")


if __name__ == "__main__":
    main()

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):
            tmp = x*x + y*y + z*z + x*y + y*z + z*x
            if tmp<10050:
                ans[tmp] += 1

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

Solution (Python):
N = int(input())
num = [0]*N
for i in range(1,10**2 + 1):
    for j in range(1,10**2 + 1):
        for k in range(1,10**2 + 1):
            ans = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if ans <= N:
                num[ans - 1] += 1
for i in range(N):
    print(num[i])

Solution (Python):
n = int(input())
a = [0]*n
s = int(n**(1/2))+1
for i in range(1, s):
    for j in range(1, s):
        for k in range(1, s):
            b = i*i+j*j+k*k+i*j+j*k+k*i-1
            if b < n:
                a[b] += 1
for i in range(n):
    print(a[i])

Solution (Python):
N = int(input())
 
def calculate_n(x, y, z):
  n = x**2 + y**2 + z**2 + x*y + y*z + z*x
  return n
l = []
for x in range(1, N):
  for y in range(1, N):
    for z in range(1, N):
      n = calculate_n(x,y,z)
      if n > N:
        break
      else:
        l.append(n)
    if calculate_n(x, y+1, 1) > N:
      break
  if calculate_n(x+1, 1, 1) > N:
    break

import collections
c = collections.Counter(l)
for i in range(1, N+1):
  if i in c:
    print(c[i])
  else:
    print(0)

Solution (Python):
import math
n=int(input())
ans=[0]*(10**5)
for x in range(1,int(math.sqrt(n))+1):
  for y in range(1,int(math.sqrt(n))+1):
    for z in range(1,int(math.sqrt(n))+1):
      ans[((x+y)**2+(y+z)**2+(z+x)**2)//2-1]+=1

for i in range(n):
  print(ans[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):
def main():
    N = int(input())
    dp = [0] * N
    rt = int(pow(N, 0.5)) + 1
    for i in range(1, rt):
        ii = i * i
        for j in range(1, i + 1):
            iji = ii + j * j + i * j
            if iji + 1 + i + j > N:
                break
            for k in range(1, j + 1):
                c = iji + k * k + (i + j) * k
                if c <= N:
                    if i == j or j == k:
                        l = 3
                        if i == k:
                            l = 1
                    else:
                        l = 6
                    dp[c - 1] += l
                else:
                    break
    print(*dp, sep="\n")


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
num = [0 for i in range(7*N)]

for x in range(1, int(N**0.5)+1):
  for y in range(1, int(N**0.5)+1):
    for z in range(1, int(N**0.5)+1):
      f_N = x**2 + y**2 + z**2 + x*y + y*z + z*x
      num[f_N] += 1

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

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

INF = float("inf")


d = defaultdict(int)
for i in range(1,100):
    for j in range(1,100):
        for k in range(1,100):
            a = i*i+j*j+k*k+i*j+j*k+k*i
            d[a] += 1
N = int(input())
for i in range(1,N+1):
    print(d[i])

Solution (Python):
n=int(input())
l=[0]*(6*(10**4))
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            l[(x*x+y*y+z*z+x*y+y*z+z*x)-1]+=1
for i in range(n):
    print(l[i])

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


def xyz():
    count = 0
    for i in range(1, 101):
        for j in range(1, 101):
            for k in range(1, 101):
                zyx = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
                ans[zyx] += 1


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

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

for i in range(1, 100):
    for j in range(1, 100):
        for k in range(1, 100):
            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())
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):
from math import sqrt
n=10**4
an=[0 for i in range(n+1)]
for i in range(1,int(sqrt(n))+1):
    for j in range(i,int(sqrt(n))+1):
        for k in range(j,int(sqrt(n))+1):
            a=i*i+j*j+k*k+i*j+i*k+j*k
            if a<=n:
                if i==j and j==k:
                    an[a]+=1
                elif i==j or j==k or i==k:
                    an[a]+=3
                else: an[a]+=6
n=int(input())
for i in range(1,n+1):
    print(an[i])

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


def main():
    n = int(si())
    ans = [0 for _ in range(10000+1)]
    for x in range(1, 100):
        for y in range(1, 100):
            for z in range(1, 100):
                v = ((x+y+z)**2+x**2+y**2+z**2)//2
                if v > 10000:
                    break
                ans[v] += 1

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


if __name__ == '__main__':
    main()

Solution (Python):
r=range(1,99)
a=[0]*5**7
for x in r:
 for y in r:
  for z in r:a[x*(x+y+z)+y*(y+z)+z*z-1]+=1
print(*a[:int(input())])