import sys





def input():

    return sys.stdin.readline().rstrip()





def main():

    N = int(input())

    dp = [0] * (N + 1)

    rt = int(N ** 0.5) + 1

    for i in range(1, rt):

        ii = i ** 2

        for j in range(1, i + 1):

            iji = ii + j ** 2 + i * j

            if iji + 1 + i + j > N:

                break

            for k in range(1, j + 1):

                c = iji + k ** 2 + i * k + j * k

                if c <= N:

                    l = 6

                    if i == j or j == k:

                        l = 3

                        if i == k:

                            l = 1

                    dp[c] += l

                else:

                    break

    print(*dp[1:N + 1], sep="\n")





if __name__ == "__main__":

    main()

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()

import sys


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


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


if __name__ == "__main__":
    main()

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()

-import sys - - -def input(): -    return sys.stdin.readline().rstrip() - - -    dp = [0] * (N + 1) -    rt = int(N**0.5) + 1 +    dp = [0] * N +    rt = int(pow(N, 0.5)) + 1 -        ii = i**2 +        ii = i * i -            iji = ii + j**2 + i * j +            iji = ii + j * j + i * j -                c = iji + k**2 + i * k + j * k +                c = iji + k * k + (i + j) * k -                    l = 6 -                    dp[c] += l +                    else: +                        l = 6 +                    dp[c - 1] += l -    print(*dp[1 : N + 1], sep="\n") +    print(*dp, sep="\n")