Let D be a Weil divisor with rational coefficients on an integral, normal, projective scheme X defined over a field K. Assume that ND is an ample Cartier divisor for some N > 0. Then A(X,D) = circle plus(n)>= 0H(0)(X,O(X)(nD))T(n) subset of K(X)[T] is a finitely generated, integrally closed, graded K-algebra. Since factorial domains are integrally closed, it is natural to ask for criteria which imply the factoriality of A (X, D). In 1984 Robbiano found the shape of the divisor D such that A(X, D) is factorial, in the case Cl (X) = Z. The main result in this paper is Theorem 29 where we give a characterization of such factorial rings valid over a field of any characteristic. In the last part of the paper we Study how the task of factorizing an element of a UFD, given as a quotient R/I, can be achieved by simply calculating inside the ring R.