Buggy python submission (verdict: Time Limit Exceeded):
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    for i in range(1,n+1):
        ans = 0
        for x in range(1,int(i**0.5+1)):
            for y in range(1,int(i**0.5+1)):
                z1 = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2
                if not isinstance(z1,complex):
                    if int(z1)==z1 and z1>=1:
                        ans += 1
                z2 = (-(x+y)-((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2
                if not isinstance(z2,complex):
                    if int(z2)==z2 and z2>=1:
                        ans += 1
        print(ans)
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    ans = [0 for i in range(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):
                a = i**2+j**2+k**2+i*j+j*k+i*k
                if a<=n:
                    ans[a] += 1
    for i in range(1,n+1):
        print(ans[i])
    return

if __name__=='__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    for i in range(1,n+1):
        ans = 0
        for j in range(1,int(i**0.5+1)):
            for k in range(1,int(i**0.5+1)):
                for l in range(1,int(i**0.5+1)):
                    if j**2+k**2+l**2+j*k+k*l+j*l==i:
                        ans += 1
        print(ans)
    return

if __name__=='__main__':
    main()


Fixed submission:
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    ans = [0 for i in range(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):
                a = i**2+j**2+k**2+i*j+j*k+i*k
                if a<=n:
                    ans[a] += 1
    for i in range(1,n+1):
        print(ans[i])
    return

if __name__=='__main__':
    main()