Is there a relationship between $\sum_{n = a^2 + b^2 < x} f(n)$, $\sum_{n < x} f(n)$, and $\sum_{n < x} f(n^2)$? Let $f$ be an arithmetical function and let $x$ be a positive real number.
What's the relation between the sum $\displaystyle{\sum_{n=a^2+b^2\leq x}} f(n) $ and $\displaystyle{\sum_{n\leq x}} f(n) $ or $\displaystyle{\sum_{n\leq x}} f(n^2).$ I mean can we express the sum $\displaystyle{\sum_{n=a^2+b^2\leq x}} f(n) $ in terms of one or the two sums above?
Many thanks.
 A: The short answer is no.
For a slightly longer answer, we consider the simplest case: when $f(n) = 1$ for all $n$. Then
$$ \sum_{n = a^2 + b^2 < x} f(n) = \sum_{n = a^2 + b^2 < x} 1 $$
is exactly equal to the number of ways of writing numbers less than $x$ as a sum of squares. It is somewhat common to call $r_2(n)$ the number of ways of representing $n$ as a sum of two squares,
$$r_2(n) := \big| \{ n = a^2 + b^2 : a,b \in \mathbb{Z}\} \big|. $$
Then
$$ \sum_{n = a^2 + b^2 < x} 1 = \sum_{n < x} r_2(n),$$
and more generally
$$ \sum_{n = a^2 + b^2 < x} f(n) = \sum_{n < x} r_2(n) f(n). \tag{1}$$
Generically, there is no way to go between $(1)$ and the sums $\sum f(n)$ or $\sum f(n^2)$.
However (and we are now getting a bit further afield), if $f(n)$ appears as a Fourier coefficient of a modular form, then there is (morally, though a bit technical) a natural $L$-function (which I'll denote by $L(s, f\times E)$) with the sums in $(1)$ appearing as Mellin transforms of $L(s, f\times E)$. I mention this because very many interesting arithmetical functions do appear as Fourier coefficients of modular forms.
