unittest
{
	assert( [ "20" ].solve == "0\n0\n0\n0\n0\n1\n0\n0\n0\n0\n3\n0\n0\n0\n0\n0\n3\n3\n0\n0" );
}



import std.conv;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	
	auto anss = new long[ n ];
	foreach( x; 1L .. 32 )
	{
		foreach( y; x .. 32 )
		{
			foreach( z; y .. 32 )
			{
				auto t = x ^^ 2 + y ^^ 2 + z ^^ 2 + x * y + y * z + z * x;
				if( n < t ) break;
				if(      x == y && y == z           ) anss[ t - 1 ]++;
				else if( x == y || y == z || x == z ) anss[ t - 1 ] += 3;
				else                                  anss[ t - 1 ] += 6;
			}
		}
	}
	return anss.to!( string[] ).join( "\n" );
}
