Given N >= 3, 1 < p < N, two measurable functions V (r) >= 0 and K(r) > 0, and a continuous function A(r) > 0 (r > 0), we study the quasilinear elliptic equation -div(A(|x|)| del u|(p-2) del u)u + V (vertical bar x vertical bar)vertical bar u vertical bar(p-2)u = K(vertical bar x vertical bar)f(u)in R-N. We find existence of nonnegative solutions by the application of variational methods, for which we have to study the compactness of the embedding of a suitable function space X into the sum of Lebesgue spaces L-q1(K) + L-q2(K), and thus into L-q(K) (= L-q(K) + L-q(K)) as a particular case. Our results do not require any compatibility between how the potentials A, V and K behave at the origin and at infinity, and essentially rely on power type estimates of the relative growth of V and K, not of the potentials separately. The nonlinearity f has a double-power behavior, whose standard example is f(t) =min{t(q1-1),t(q2-1)}, recovering the usual case of a single-power behavior when q(1) = q(2).