The goal of this paper is to study sets of integers with an average sum of digits. More precisely, let g be a fixed integer, s(n) be the sum of the digits of n in basis g. Let f : N -> N such that, in any interval [g(nu), g(nu+1) [, f (n) is constant and near from (g - 1)nu/2. We give an asymptotic for the number of integers n < x such that s (n) = f (n) and we prove that for every irrational alpha the sequence (alpha n) is equidistributed mod 1, for n satisfying s(n) = f (n). (c) 2005 Elsevier Inc. All rights reserved.