We prove uniform bounds for the Petersson norm of the cuspidal part of the theta series. This gives an improved asymptotic formula for the number of representations by a quadratic form. As an application, we show that every integer n ‰ 0, 4, 7 pmod 8q is represented as n3 for integers x 1 , x 2 , x 3 such that the product x 1 x 2 x 3 has at most 72 prime divisors.