Let

be a prime number and define

where

is the number of divisors of

and

is the Legendre symbol. When

is a quadratic residue modulo

, then the convolution

could be close to the
number of divisors of

. The aim of this work is to compare the mean
value of the function

to the well known
average order of

. A bound for short sums in the case

is
also given, using profound results from the theory of integer points
close to certain smooth curves.
Received January 14 2017; revised versions received June 1 2017; June 26 2017.
Published in Journal of Integer Sequences, July 1 2017.