Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())

def search(n):
    global N
    for x in range(1, int(math.sqrt(n)) + 1):
        if n - x*x <= 0:
            return None
        for y in range(1, int(math.sqrt(n)) + 1):
            if n - x*x - y*y - x*y <= 0:
                break
            z = binarySearch(n, x, y)
            if z:
                return (x, y, z)


def binarySearch(n, x, y):
    global N
    right = -1
    left = N + 1
    while(abs(right - left) > 1):
        z = left + (right - left) // 2
        l = x*x + y*y + z*z + x*y + y*z + z*x
        if l == n:
            return z
        elif l < n:
            right = z
        else:
            left = z
        # print(right, left, z)
    return None

for n in range(1, N+1):
    ans = search(n)
    if ans == None:
        print(0)
        continue
    ans = len(set(ans))
    if ans == 1:
        print(1)
    elif ans == 2:
        print(3)
    else:
        print(6)

Fixed submission:
N = int(input())
ans = [0]*10010

for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):
            v = x*x + y*y + z*z + x*y + y*z + z*x
            if v <= 10005:
                ans[v] += 1
for i in range(1, N+1):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())

def search(n):
    global N
    for x in range(1, int(math.sqrt(N)) + 1):
        if n - x*x <= 0:
            return None
        for y in range(1, int(math.sqrt(N)) + 1):
            if n - x*x - y*y - x*y <= 0:
                break
            z = binarySearch(n, x, y)
            if z:
                return (x, y, z)


def binarySearch(n, x, y):
    global N
    right = -1
    left = N + 1
    while(abs(right - left) > 1):
        z = left + (right - left) // 2
        l = x*x + y*y + z*z + x*y + y*z + z*x
        if l == n:
            return z
        elif l < n:
            right = z
        else:
            left = z
        # print(right, left, z)
    return None

for n in range(1, N+1):
    ans = search(n)
    if ans == None:
        print(0)
        continue
    ans = len(set(ans))
    if ans == 1:
        print(1)
    elif ans == 2:
        print(3)
    else:
        print(6)

Fixed submission:
N = int(input())
ans = [0]*10010

for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):
            v = x*x + y*y + z*z + x*y + y*z + z*x
            if v <= 10005:
                ans[v] += 1
for i in range(1, N+1):
    print(ans[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

def search(n):
    global N
    for x in range(1, N):
        if n - x*x <= 0:
            return None
        for y in range(1, N):
            if n - x*x - y*y - x*y <= 0:
                break
            z = binarySearch(n, x, y)
            if z:
                return (x, y, z)


def binarySearch(n, x, y):
    global N
    right = -1
    left = N + 1
    while(abs(right - left) > 1):
        z = left + (right - left) // 2
        if x*x + y*y + z*z + x*y + y*z + z*x == n:
            return z
        elif x*x + y*y + z*z + x*y + y*z + z*x < n:
            right = z
        else:
            left = z
        # print(right, left, z)
    return None

for n in range(1, N+1):
    ans = search(n)
    if ans == None:
        print(0)
        continue
    ans = len(set(ans))
    if ans == 1:
        print(1)
    elif ans == 2:
        print(3)
    else:
        print(6)

Fixed submission:
N = int(input())
ans = [0]*10010

for x in range(1, 105):
    for y in range(1, 105):
        for z in range(1, 105):
            v = x*x + y*y + z*z + x*y + y*z + z*x
            if v <= 10005:
                ans[v] += 1
for i in range(1, N+1):
    print(ans[i])