In a recent paper, Sun posed six conjectures on the relations between T (a 1 , a 2 , ... , a k ; n) and N (a 1 , a 2 , ... , a k ; n) , where T (a 1 , a 2 , ... , a k ; n) denotes the number of representations of n as a 1 x 1 (x 1 + 1) 2 + a 2 x 2 (x 2 + 1) 2 + ⋯ + a k x k (x k + 1) 2 , where a 1 , a 2 , ... , a k are positive integers, n , x 1 , x 2 , ... , x k are arbitrary nonnegative integers, and N (a 1 , a 2 , ... , a k ; n) denotes the number of representations of n as a 1 x 1 2 + a 2 x 2 2 + ⋯ + a k x k 2 , where this time x 1 , x 2 , ... , x k are integers. In this paper, we prove Sun's six conjectures by using Ramanujan's theta function identities. [ABSTRACT FROM AUTHOR]