Let K be a positive integer. A partition {A(k), 1 <= k <= K) of the sequence of squares being given, we consider the question of estimating the smallest number t(K) such that any large integer can be written as a sum of less than t(K) elements all taken from one of the sets A(k). The analogous question for the primes is also tackled. (C) 2006 Elsevier Inc. All rights reserved.