# Sums of divisors on arithmetic progressions

Prapanpong Pongsriiam  Department of Mathematics
Faculty of Science, Silpakorn University
Nakhon Pathom
73000
THAILAND<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract.

For each $s\in\mathbb{R}$ and $n\in\mathbb{N}$, let $\sigma_{s}(n)=\sum_{d\mid
n}d^{s}$. In this article, we give a comparison between $\sigma_{s}(an+b)$ and
$\sigma_{s}(cn+d)$ where $a$, $b$, $c$, $d$, $s$ are fixed, the vectors
$(a,b)$ and $(c,d)$ are linearly independent over $\mathbb{Q}$, and $n$ runs
over all positive integers. For example, if $|s|\leq 1$,
$a,b,c,d\in\mathbb{N}$ are fixed and satisfy certain natural conditions, then

$\sigma_{s}(an+b)<\sigma_{s}(cn+d)\quad\text{ for all $n\leq M$}$

where $M$ may be arbitrarily large, but in fact
$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ has infinitely many sign changes. The
results are entirely different when $|s|>1$, where the following three cases
may occur:

  * (i)

$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $n\in\mathbb{N}$;

  * (ii)

$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $n\leq M$ and
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $n\geq M+1$;

  * (iii)

$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ has infinitely many sign changes.

We also give several examples and propose some problems.

###### Key words and phrases:

divisor function; arithmetic progression; local behavior; arithmetic function;
inequality

###### 2020 Mathematics Subject Classification:

Primary 11A25; Secondary 11B25, 11N64

##  1\. Introduction

Perhaps, the most interesting inequalities in number theory are those between
primes and functions whose values depend on primes. For example, functions $f$
and $g$ may satisfy $f(x)<g(x)$ on a large interval $[1,M]$, but in fact
$f(x)-g(x)$ has infinitely many sign changes as $x\to\infty$; and the smallest
number $x_{0}$ for which $f(x_{0})>g(x_{0})$ exists in theory but is very
difficult to find explicitly. Although it might be better to focus only on
those $f$ and $g$ which are asymptotic and satisfy some kinds of Chebyshev’s
bias phenomenon, we do not require these conditions here. In fact, we are
interested in the inequalities between $f(x)$ and $g(x)$ and the number of
sign changes in $f(x)-g(x)$ as $x\to\infty$.

In this article, we will be concerned with the comparison between the values
of the function $\sigma_{s}$ over arithmetic progressions. Throughout, $s$ is
a real number, $m$ and $n$ are positive integers, $p$ is a prime, $p_{n}$ is
the $n$th prime, $\varphi(n)$ is the number of $m\leq n$ with $\gcd(m,n)=1$,
$\sigma_{s}(n)=\sum_{d\mid n}d^{s}$, $\tau(n)=\sigma_{0}(n)$,
$\sigma(n)=\sigma_{1}(n)$, and $\zeta$ is the Riemann zeta function which is
given by $\zeta(s)=\sum_{n=1}^{\infty}n^{-s}$ for $s>1$. We sometimes simply
write $(m,n)$ to denote $\gcd(m,n)$.

Jarden [7, p. 65] observed that $\varphi(30n+1)>\varphi(30n)$ for all $n\leq
10^{5}$ and further computations will show us that this inequality continues
to hold for all $n$ up to a billion. However, contrary to the numerical
evidence, Newman [17] proved that there are infinitely many $n$ such that
$\varphi(30n+1)<\varphi(30n)$; the smallest such $n$ for which this inequality
holds has $1116$ digits and was given explicitly by Martin [15], namely,
$n=(z-1)/30$ where $z=\left(\prod_{j=4}^{383}p_{j}\right)p_{385}p_{388}$.
Aldaz, Bravo, Gutiérrez, and Ubis [1] extended Newman’s theorem to the
following form: if $a$, $b$, $c$, $d$ are nonnegative integers, $a,c>0$, and
$ad-bc\neq 0$, then

$\liminf_{n\to\infty}\frac{\varphi(an+b)}{\varphi(cn+d)}=0\quad\text{and}\quad\limsup_{n\to\infty}\frac{\varphi(an+b)}{\varphi(cn+d)}=\infty.$

The assumption $ad-bc\neq 0$ is necessary because they [1] also showed that if
$ad-bc=0$, then $R\leq\varphi(an+b)/\varphi(cn+d)\leq M$ for some positive
real numbers $R$ and $M$, and so the limits infimum and supremum are not $0$
and $\infty$, respectively. This gives a complete picture for the comparison
between $\varphi(an+b)$ and $\varphi(cn+d)$.

However, as far as we are aware, this kind of investigation has not been done
for $\sigma_{s}$. We find a similar (but reverse) inequality, namely,

$\sigma(30n+1)<\sigma(30n)\quad\text{for all $n\leq 10^{7}$,}$

yet there are infinitely many $n$ for which $\sigma(30n+1)>\sigma(30n)$. In
general, if $-1\leq s\leq 1$, then the results for $\sigma_{s}$ are similar to
those of $\varphi$ (see Theorem 2.5, Corollary 2.6, and Examples 2.7 and
2.14). Nevertheless, if $|s|>1$, then the answers are completely different.
First of all, we show in Theorem 2.9 that $\sigma_{s}(an+b)/\sigma_{s}(cn+d)$
is bounded away from $0$ and $\infty$. Secondly, comparing the size of
$\sigma_{s}(an+b)$ and $\sigma_{s}(cn+d)$, the following three inequality
examples may occur:

  * (IE1)

Always win or always lose: $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all
$n\in\mathbb{N}$ (see Theorems 2.10, 2.11 and 2.12, and Examples 2.2 and
2.14).

  * (IE2)

Change signs exactly once: $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for an
arbitrarily long string of consecutive integers $n=1,2,\ldots,M$, and
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $n\geq M+1$ (see Theorem 2.15 and
Example 2.18).

  * (IE3)

Change signs infinitely often:

$\sigma_{s}(an+b)<\sigma_{s}(cn+d)\;\text{
and}\;\sigma_{s}(am+b)>\sigma_{s}(cm+d)$

for infinitely many $m$ and $n$ (see Theorems 2.19 and 2.20).

The inequalities in (IE1), (IE2), and (IE3) may be considered as the $0$-type,
$1$-type, and $\infty$-type inequalities according to the number of sign
changes in $\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ as $a$, $b$, $c$, $d$ are fixed
and $n$ runs over all positive integers. We do not know whether or not there
exists an example for a $k$-type inequality for each positive integer $k>1$
(see also Problem 12).

By changing the role of $a$, $b$, $c$, $d$, we can replace the signs $<$ by
$>$ and $>$ by $<$ in (IE1), (IE2), and (IE3). In addition, to avoid
triviality or unnecessary complications, we focus our study on the cases where
$a$, $b$, $c$, $d$ are nonnegative integers, $a,c>0$, and $ad-bc\neq 0$. Note
that the assumption $ad-bc\neq 0$ is equivalent to $(a,b)$ and $(c,d)$ are
linearly independent over $\mathbb{Q}$; for if $ad-bc=0$, then
$\frac{1}{a}(a,b)-\frac{1}{c}(c,d)=(0,0)$ and if $(a,b)=(q_{1}/q_{2})(c,d)$
for some $q_{1}\in\mathbb{Z}$, $q_{2}\in\mathbb{N}$, then $ad-
bc=\left(q_{1}c/q_{2}\right)d-\left(q_{1}d/q_{2}\right)c=0$.

In the next section, we prove the main results and show several examples. We
also propose some possible research problems and give some related references.
We do not plan to solve these problems soon; we will do it in the future but
we do not mind if the reader will solve them.

##  2\. Main Results

Throughout, let $a$, $b$, $c$, $d$ be nonnegative integers with $a,c>0$. We
first deal with the case $ad=bc$ in Theorem 2.1 and Example 2.2. After that,
we restrict ourselves to the case $ad\neq bc$ and give general criteria and
several examples for (IE1), (IE2), and (IE3) introduced earlier. Recall that
the function $\sigma_{s}$ is multiplicative for every $s\in\mathbb{R}$, and
observe that if $ad=bc$, then there are positive integers $r_{1}$ and $r_{2}$
such that $r_{1}(a,b)=r_{2}(c,d)$. We have the following result.

###  2.1. The case $ad=bc$ and $s\in\mathbb{R}$

######  Theorem 2.1.

Let $s\in\mathbb{R}$ and let $a$, $b$, $c$, $d$ be nonnegative integers,
$a,c>0$, and $ad=bc$. Let $r_{1}$ and $r_{2}$ be positive integers such that
$r_{1}(a,b)=r_{2}(c,d)$. Then for every $n\geq 1$,

$\frac{r_{2}^{s}}{\sigma_{s}(r_{1})}\leq\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\frac{\sigma_{s}(r_{2})}{r_{1}^{s}}.$

###### Proof.

Observe that if $p$ is a prime and $\alpha$, $\beta$ are nonnegative integers,
then $\sigma_{s}(p^{\alpha})\sigma_{s}(p^{\beta})$ is equal to
$(1+p^{s}+\cdots+p^{\alpha s})(1+p^{s}+\cdots+p^{\beta s})$, which is larger
than or equal to

$(1+p^{s}+\cdots+p^{\alpha s})+p^{\alpha s}(p^{s}+p^{2s}+\cdots+p^{\beta
s})=1+p^{s}+p^{2s}+\cdots+p^{(\alpha+\beta)s}=\sigma_{s}(p^{\alpha+\beta}).$

Similarly, $\sigma_{s}(p^{\alpha+\beta})\geq p^{\alpha
s}\sigma_{s}(p^{\beta})$. From this and the multiplicativity of $\sigma_{s}$,
it follows that $\sigma_{s}(m)\sigma_{s}(n)\geq\sigma_{s}(mn)\geq
m^{s}\sigma_{s}(n)$ for all $m,n\in\mathbb{N}$. Therefore for every $n\geq 1$,

$\displaystyle\sigma_{s}(r_{1})\sigma_{s}(an+b)$
$\displaystyle\geq\sigma_{s}(r_{1}(an+b))\geq r_{1}^{s}\sigma_{s}(an+b),$
$\displaystyle\sigma_{s}(r_{2})\sigma_{s}(cn+d)$
$\displaystyle\geq\sigma_{s}(r_{2}(cn+d))\geq r_{2}^{s}\sigma_{s}(cn+d).$

Since the middle terms of each inequality are the same, these lead to the
desired result. ∎

######  Example 2.2.

If $a,b,c,d$ are integers as given in Theorem 2.1, then it is easy to
construct an example such that $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all
$n\in\mathbb{N}$. For example, $\sigma_{s}(2n)<\sigma_{s}(4n)$ for all
$n\in\mathbb{N}$ and $s\in\mathbb{R}$. In general, if $0<a<c$ and $a\mid c$,
then every divisor of $a$ is also a divisor of $c$, while $c\mid c$ but
$c\nmid a$, which implies $\sigma_{s}(an)<\sigma_{s}(cn)$ for all
$n\in\mathbb{N}$ and $s\in\mathbb{R}$.

######  Problem 1.

By Example 2.2, we know that (IE1) exists for infinitely many $a,b,c,d$
satisfying $ad=bc$. It is natural to ask whether or not (IE2) and (IE3) can
occur in this case. For example, if $M$ is a given positive integer, can we
always find $s\in\mathbb{R}$ and $a,b,c,d$ satisfying the assumption of
Theorem 2.1 such that $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for $n\leq M$ and
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $n\geq N$ where $N\geq M+1$? Can
we choose $N$ to be $M+1$ for each $M$? If $s$ is a given real number, are
there nonnegative integers $a,b,c,d$ satisfying $a,c>0$ and $ad=bc$ such that
$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign infinitely many times?

######  Problem 2.

Does the converse of Example 2.2 hold? In other words, if $s\in\mathbb{R}$,
$a,b,c,d$ are nonnegative integers, $a,c>0$, $ad=bc$, and

$\sigma_{s}(an+b)<\sigma_{s}(cn+d)\quad\text{for all $n\in\mathbb{N}$,}$

can we conclude that $a\mid c$? or perhaps $(a,b)\mid(c,d)$?

######  Remark 2.3.

Before proceeding to the next subsection, let us recall that if $1+a_{n}>0$
for all $n\in\mathbb{N}$, then the infinite product
$\prod_{n=1}^{\infty}(1+a_{n})$ is said to be convergent if
$\lim_{k\to\infty}\prod_{n=1}^{k}(1+a_{n})$ exists and is not zero. If the
limit converges to zero (or diverges to $\infty$), then the infinite product
is said to diverge to zero (or diverge to $\infty$), respectively. In
addition, it is well-known that if $\sum_{n=1}^{\infty}|a_{n}|$ converges,
then $\prod_{n=1}^{\infty}(1+|a_{n}|)$ converges; if
$\sum_{n=1}^{\infty}|a_{n}|=\infty$, then $\prod_{n=1}^{\infty}(1+|a_{n}|)$
also diverges to $\infty$.

We will often refer to the following condition:

(A) $a,b,c,d$ are nonnegative integers, $a,c>0$, and $ad\neq bc$. (2.1)

###  2.2. The case $ad\neq bc$ and $|s|\leq 1$

######  Theorem 2.4.

Let $a,b,c,d$ satisfy the condition (A) given in (2.1). Then there exists a
strictly increasing sequence $(n_{k})$ of positive integers that does not
depend on $s$ and

${\rm(i)}\lim_{k\to\infty}\frac{\sigma_{s}(an_{k}+b)}{\sigma_{s}(cn_{k}+d)}=0\quad\text{for
all $s\in[0,1]$}.$

In particular, if $0\leq s\leq 1$, then

(ii)
$\displaystyle\liminf_{n\to\infty}\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}=0$
and (iii)
$\displaystyle\limsup_{n\to\infty}\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}=\infty$.

###### Proof.

We modify the idea of Newman [17] and Aldaz et. al [1]. Recall that $p$ is
always a prime and $p_{n}$ is the $n$th prime. Let $D=2\tau(|ad-bc|)$ and for
each $k\geq 1$, let $m_{k}$ be the product of all primes $p\leq p_{k}$ with
$p\nmid c$. Since $ad-bc\neq 0$, $D$ is well-defined. In addition, $m_{k}$ is
a finite product, $m_{k}\leq p_{k}^{k}$, and $m_{k}\to\infty$ as $k\to\infty$.
The following observation will be used throughout this article sometimes
without reference. We have, for any $s\geq 0$,

$\frac{\sigma_{s}(n)}{n^{s}}=\sum_{d\mid
n}\frac{1}{d^{s}}=\prod_{p^{\alpha}\parallel
n}\left(1+\frac{1}{p^{s}}+\frac{1}{p^{2s}}+\cdots+\frac{1}{p^{\alpha
s}}\right)\geq\prod_{p\mid n}\left(1+\frac{1}{p^{s}}\right).$ (2.2)

Next, we will construct a strictly increasing sequence $(n_{k})$ of positive
integers such that

$\frac{\sigma_{s}(an_{k}+b)}{(an_{k}+b)^{s}}\leq
D\quad\text{and}\quad\lim_{k\to\infty}\frac{(cn_{k}+d)^{s}}{\sigma_{s}(cn_{k}+d)}=0\quad\text{for
all $s\in[0,1]$}.$ (2.3)

Since $\gcd(m_{k},c)=1$, there exists a pair of integers $n_{0}$, $y_{0}$
which is a solution to the Diophantine equation $cn-m_{k}y=-d$, and all
solutions are given by $n=n_{0}+m_{k}t$ and $y=y_{0}+ct$ where
$t\in\mathbb{Z}$ is arbitrary. We keep in mind that the integers $n_{0}$,
$y_{0}$ may depend on $k$ and so $n$ and $y$ depend on $k$ and $t$. Then
$an+b=a(n_{0}+m_{k}t)+b=(an_{0}+b)+am_{k}t=\delta(A+Bt)$ where
$\delta=\gcd(an_{0}+b,am_{k})$, $A=(an_{0}+b)/\delta$, and $B=am_{k}/\delta$.
Then $\delta$ divides $c(an_{0}+b)-y_{0}(am_{k})=a(cn_{0}-m_{k}y_{0})+bc=bc-
ad$. Since $(A,B)=1$, we obtain by Dirichlet’s theorem for primes in
arithmetic progressions that there are infinitely many $t\in\mathbb{Z}^{+}$
such that $A+Bt$ is a prime. So we choose $t\in\mathbb{Z}^{+}$ so that $A+Bt$
is a prime larger than $|bc-ad|\geq\delta$. Therefore for each $k\geq 1$, we
can choose a large positive integer $t_{k}$ and a pair of positive integers
$n_{k}=n_{k,t_{k}}$, $y_{k}=y_{k,t_{k}}$ satisfying $cn_{k}-m_{k}y_{k}=-d$,
$an_{k}+b=\delta q_{k}$ where $q_{k}$ is a prime larger than $\delta$,
$n_{k+1}-n_{k}>0$, and $q_{k+1}-q_{k}>0$ for all $k$. Now that we have the
sequence $(n_{k})$, it remains to prove (2.3). So let $s\in[0,1]$. Since
$s\leq 1$, the series $\sum_{p}p^{-s}$ diverges to $\infty$. In addition, by
(2.2) and the fact that $cn_{k}+d=m_{k}y_{k}$, we obtain

$\frac{(cn_{k}+d)^{s}}{\sigma_{s}(cn_{k}+d)}\leq\prod_{p\mid
m_{k}y_{k}}\left(1+\frac{1}{p^{s}}\right)^{-1}\leq\prod_{p\mid
m_{k}}\left(1+\frac{1}{p^{s}}\right)^{-1}=\prod_{\begin{subarray}{c}p\leq
p_{k}\\\ p\nmid c\end{subarray}}\left(1+\frac{1}{p^{s}}\right)^{-1},$

which diverges to zero as $k\to\infty$. Hence the second part of (2.3) is
verified. Since $an_{k}+b=\delta q_{k}$, $\delta\mid ad-bc$, $q_{k}>\delta$,
and $\sigma_{s}$ is multiplicative, we have

$\frac{\sigma_{s}(an_{k}+b)}{(an_{k}+b)^{s}}=\frac{\sigma_{s}(\delta)}{\delta^{s}}\frac{\sigma_{s}(q_{k})}{q_{k}^{s}}=\left(\sum_{u\mid\delta}\frac{1}{u^{s}}\right)\left(1+\frac{1}{q_{k}^{s}}\right)\leq
2\tau(\delta)\leq D,$

which is the first part of (2.3). By writing,

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}=\frac{\sigma_{s}(an+b)}{(an+b)^{s}}\cdot\left(\frac{an+b}{cn+d}\right)^{s}\cdot\frac{(cn+d)^{s}}{\sigma_{s}(cn+d)},$
(2.4)

substituting $n=n_{k}$, and applying (2.3), we obtain (i). Then (ii) follows
immediately from (i). Since (ii) holds for all $a,b,c,d$, we can interchange
the role of $a,c$ and $b,d$ to obtain (iii). This completes the proof. ∎

We can extend Theorem 2.4 to the case $s\in[-1,1]$ as follows.

######  Theorem 2.5.

Let $a$, $b$, $c$, $d$ satisfy the condition (A) and $(n_{k})$ the sequence
constructed in the proof of Theorem 2.4. Then
$\sigma_{s}(an_{k}+b)/\sigma_{s}(cn_{k}+d)$ converges to zero as $k\to\infty$
for all $s\in[-1,1]$. In addition, there exists a sequence $(m_{k})$ such that
$\sigma_{s}(am_{k}+b)/\sigma_{s}(cm_{k}+d)\to\infty$ as $k\to\infty$ for all
$s\in[-1,1]$. In particular, if $|s|\leq 1$, then

$\liminf_{n\to\infty}\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}=0\quad\text{and}\quad\limsup_{n\to\infty}\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}=\infty.$

###### Proof.

If $0\leq s\leq 1$, then this follows from Theorem 2.4. So assume that $-1\leq
s<0$. Let $r=-s$. Then $0<r\leq 1$ and for each $m\in\mathbb{N}$, we have

$\frac{\sigma_{r}(m)}{m^{r}}=\sum_{d\mid m}\frac{1}{d^{r}}=\sum_{d\mid
m}d^{s}=\sigma_{s}(m).$

Therefore

$\frac{\sigma_{s}(an_{k}+b)}{\sigma_{s}(cn_{k}+d)}=\frac{\sigma_{r}(an_{k}+b)}{\sigma_{r}(cn_{k}+d)}\left(\frac{cn_{k}+d}{an_{k}+b}\right)^{r}.$

Applying Theorem 2.4 to the right-hand side of the above equation, we obtain
that the left-hand side converges to zero as $k\to\infty$, as required. Since
this is true for all $a,b,c,d$, we can interchange the role of $a,b,c,d$ to
obtain the sequence $(m_{k})$ with the desired property. The rest follows
immediately. ∎

######  Corollary 2.6.

If $-1\leq s_{1}<s_{2}<\cdots<s_{\ell}\leq 1$ and $a$, $b$, $c$, $d$ satisfy
the condition (A), then there are infinitely many $m,n\in\mathbb{N}$ such that

$\sigma_{s}(am+b)<\sigma_{s}(cm+d)\;\text{and}\;\sigma_{s}(an+b)>\sigma_{s}(cn+d)$

for all $s\in\\{s_{1},s_{2},\ldots,s_{\ell}\\}$.

###### Proof.

Since the sequences $(n_{k})$ and $(m_{k})$ in Theorem 2.5 can be used for all
$s\in[-1,1]$, this corollary follows immediately from Theorem 2.5. ∎

######  Example 2.7.

By running the computation in a computer, we find that

$\sigma_{s}(30n+1)<\sigma_{s}(30n)\quad\text{for all $s\in\\{-1,0,1/2,1\\}$
and $n\leq 10^{6}$.}$

However, by Corollary 2.6, there are infinitely many $m\in\mathbb{N}$ such
that

$\sigma_{s}(30m+1)>\sigma_{s}(30m)\quad\text{for all $s\in\\{-1,0,1/2,1\\}$.}$

The smallest $m$ for which $\sigma_{1/2}(30m+1)>\sigma_{1/2}(30m)$ is
$m=2338703$. When $s\in\\{-1,0,1\\}$ the smallest such $m$ seems to be very
large.

######  Problem 3.

It may be interesting to find the smallest positive integer $n$ for which the
following inequalities hold:

$\sigma(6n+1)>\sigma(6n),\sigma(30n+1)>\sigma(30n),\sigma(210n+1)>\sigma(210n),\;\text{etc.}$

Adjusting Martin’s method [15] may lead to such the integer $n$. In general,
suppose $a,b,c,d$ are fixed and satisfy the condition (A). Let
$f:[-1,1]\to\mathbb{N}$ be defined by $f(s)=f_{\sigma,a,b,c,d}(s)=n_{s}$ be
the smallest positive integer for which
$\sigma_{s}(an_{s}+b)-\sigma_{s}(cn_{s}+d)$ changes sign. How is $f$ behave?
Is $f$ increasing on $[1/2,1]$? Definitely, the answer depends on $a,b,c,d$.
Are there $a,b,c,d$ such that $f$ is increasing on $[-1,1]$ or on $[0,1]$? Is
$f$ a step function? Many questions can be asked. We leave them to the
reader’s curiosity. For $2\leq k\leq 10$, let
$g(k)=f_{\sigma,6,1,6,0}\left(\frac{k-1}{k}\right)$ be the smallest $n$ such
that $\sigma_{\frac{k-1}{k}}(6n+1)>\sigma_{\frac{k-1}{k}}(6n)$. Then, by
running the computation in a computer, we find that $g(2)=379$, $g(3)=5839$,
$g(4)=95929=g(5)$, $g(6)=326159=g(7)$, $g(8)=2198029=g(9)$, and
$g(10)=7813639$. This is a numerical data which suggests that $g$ may be
increasing on $[1/2,1]$.

######  Remark 2.8.

When $|s|>1$, the results are entirely different. First of all, unlike the
results for $|s|\leq 1$ in Theorem 2.5, it does not matter if $ad-bc$ is zero
or nonzero, $\sigma_{s}(an+b)/\sigma_{s}(cn+d)$ is always bounded away from
zero and infinity when $|s|>1$ as shown in the next theorem.

###  2.3. The first case for $|s|>1$

######  Theorem 2.9.

Let $|s|>1$ and let $a$, $b$, $c$, $d$ be nonnegative integers with $a,c>0$.
Then there are positive real numbers $R$ and $M$ such that

$\frac{R^{|s|}}{\zeta(|s|)}\leq\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\zeta(|s|)M^{|s|}.$

###### Proof.

Since $(an+b)/(cn+d)$ converges to $a/c>0$ as $n\to\infty$, there are
$R_{1},M_{1}>0$ such that $R_{1}\leq(an+b)/(cn+d)\leq M_{1}$ for all $n\geq
1$. Let $R=\min\\{1,R_{1}\\}$ and $M=\max\\{1,M_{1}\\}$. If $s>1$ and
$n\in\mathbb{N}$, then

$R^{s}\leq\frac{(an+b)^{s}}{(cn+d)^{s}}\leq M^{s}$

and

$1\leq\frac{\sigma_{s}(n)}{n^{s}}=\sum_{d\mid
n}\frac{1}{d^{s}}\leq\sum_{d=1}^{\infty}\frac{1}{d^{s}}=\zeta(s).$ (2.5)

So if $s>1$ and $n\in\mathbb{N}$, we write $\sigma_{s}(an+b)/\sigma_{s}(cn+d)$
as in (2.4) and apply (2.5) to obtain the desired result. If $s<-1$ and
$n\in\mathbb{N}$, then

$1\leq\sigma_{s}(n)=\sum_{d\mid n}\frac{1}{d^{-s}}\leq\zeta(-s)$

and therefore

$\frac{R^{-s}}{\zeta(-s)}\leq\frac{1}{\zeta(-s)}\leq\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\zeta(-s)\leq\zeta(-s)M^{-s}.$

This completes the proof. ∎

Various situations where (IE1) may occur are given in Theorems 2.10 and 2.12.
The integer $N$ in Theorem 2.10 may or may not be $1$ but it can be chosen to
be $1$ as shown in Theorems 2.11 and 2.12. From this point on, we restrict
ourselves to the case $s>1$ and leave the study of $s<-1$ to the interested
reader.

######  Theorem 2.10.

Suppose $a$ and $c$ are distinct positive integers.

  * (i)

If $a>c$ and $b,d$ are nonnegative integers, then there are $N\in\mathbb{N}$
and a real number $s_{0}>1$ such that $\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for
all $s\geq s_{0}$ and $n\geq N$.

  * (ii)

If $a<c$ and $b,d$ are nonnegative integers, then there are $N\in\mathbb{N}$
and a real number $s_{0}>1$ such that $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for
all $s\geq s_{0}$ and $n\geq N$.

###### Proof.

As usual, (ii) follows from (i) by changing the role of $a$, $c$ and $b$, $d$.
So we only need to prove (i). Let $\varepsilon=(a/c-1)/2$. Then
$1<1+\varepsilon<a/c$. Since $(an+b)/(cn+d)\to a/c$ as $n\to\infty$, there
exists $N\in\mathbb{N}$ such that $an+b>(1+\varepsilon)(cn+d)$ for all $n\geq
N$. In addition, $\zeta(s)\to 1$ as $s\to\infty$, so there exists $s_{0}>1$
such that $\zeta(s)<1+\varepsilon$ for all $s\geq s_{0}$. For $s\geq s_{0}$
and $n\geq N$, the first quotient on the right-hand side of (2.4) is larger
than $1$, and therefore

$\displaystyle\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}$
$\displaystyle>\left(\frac{an+b}{cn+d}\right)^{s}\frac{(cn+d)^{s}}{\sigma_{s}(cn+d)}>\frac{(1+\varepsilon)^{s}}{\sum_{k\mid
cn+d}k^{-s}}$
$\displaystyle>\frac{(1+\varepsilon)^{s}}{\zeta(s)}>(1+\varepsilon)^{s-1}>1.$

This completes the proof. ∎

Adjusting Theorem 2.10 a little, we can take $N=1$ as follows.

######  Theorem 2.11.

Let $a,b,c,d$ be integers. Then the following statements hold.

  * (i)

If $a>c>0$ and $b\geq d\geq 0$, then there exists $s_{0}>1$ such that
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and $n\geq 1$.

  * (ii)

If $0<a<c$ and $0\leq b\leq d$, then there exists $s_{0}>1$ such that
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and $n\geq 1$.

###### Proof.

We only need to prove (i). Following the proof of Theorem 2.10, let
$\varepsilon$ be a positive real number satisfying

$\varepsilon<\min\left\\{\frac{1}{c},\frac{b-d+1}{c+d}\right\\}.$

Since $a\geq c+1$ and $\varepsilon c<1$, we have $a-c-\varepsilon c\geq
1-\varepsilon c>0$. Therefore, for every $n\geq 1$,

$\displaystyle(an+b)-(1+\varepsilon)(cn+d)$ $\displaystyle=(a-c-\varepsilon
c)n+b-d-\varepsilon d$ $\displaystyle\geq(1-\varepsilon c)+b-d-\varepsilon d$
$\displaystyle=(1+b-d)-\varepsilon(c+d)>0.$

Thus, $an+b>(1+\varepsilon)(cn+d)$ for all $n\geq 1$, that is, we can take $N$
in the proof of Theorem 2.10 to be $N=1$. The rest is the same and the proof
is complete. ∎

The difference between the assumptions of Theorem 2.10 and 2.11(i) is that
$b\geq d\geq 0$ in the latter while $b,d$ are any given nonnegative integers
in the former. In both theorems, the real number $s_{0}$ is selected and
depends on the given integers $a,b,c,d$. In the next theorem, $s_{0}$ may be
chosen to be independent of $a,b,c,d$.

######  Theorem 2.12.

Let $s_{0}>1$, $a$, $b$, $c$, $d$ satisfy the condition (A) and $ad>bc$. If
either $a^{s_{0}}\zeta(s_{0})<c^{s_{0}}$ or $1\leq a<c(1-1/s_{0})$, then
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $n\in\mathbb{N}$ and for all
$s\geq s_{0}$. In particular, for each $s_{0}>1$, there are infinitely many
nonnegative integers $a$, $b$, $c$, $d$ such that $0<a<c$, $ad-bc>0$, and
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and
$n\in\mathbb{N}$.

###### Proof.

We first recall that for $s>1$ and $x>0$, we have

$\sum_{n\leq x}\frac{1}{n^{s}}\leq
1+\int_{1}^{x}\frac{1}{t^{s}}dt=\frac{s}{s-1}+\frac{x^{1-s}}{1-s}\leq\frac{s}{s-1},$

which implies $\zeta(s)\leq s/(s-1)$. Now suppose that either
$a^{s_{0}}\zeta(s_{0})<c^{s_{0}}$ or $1\leq a<c(1-1/s_{0})$ holds. Since $ad-
bc>0$, we see that

$\frac{an+b}{cn+d}<\frac{a}{c}<1\quad\text{ for every $n\in\mathbb{N}$.}$

Therefore if $a^{s_{0}}\zeta(s_{0})<c^{s_{0}}$, $n\in\mathbb{N}$, and $s\geq
s_{0}$, then

$\displaystyle\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}$
$\displaystyle=\frac{\sigma_{s}(an+b)}{(an+b)^{s}}\left(\frac{an+b}{cn+d}\right)^{s}\frac{(cn+d)^{s}}{\sigma_{s}(cn+d)}$
$\displaystyle\leq\zeta(s)\left(\frac{a}{c}\right)^{s}\leq\zeta(s_{0})\left(\frac{a}{c}\right)^{s_{0}}<1.$

If $1\leq a<c(1-1/s_{0})$, then the above implies that for $s\geq s_{0}$ and
$n\in\mathbb{N}$,

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\zeta(s_{0})\left(\frac{a}{c}\right)^{s_{0}}\leq\frac{s_{0}}{s_{0}-1}\left(\frac{a}{c}\right)<1.$

In any case, we have $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all
$n\in\mathbb{N}$ and $s\geq s_{0}$. It remains to show that there are
infinitely many nonnegative integers $a$, $b$, $c$, $d$ satisfying all the
required condition. Since $s_{0}>1$ is given, we can find a large positive
integer $c$ such that $c(1-1/s_{0})>1$. Then there exists a positive integer
$a<c(1-1/s_{0})$. Now we can choose any $b\geq 0$ and then select any $d$
satisfying $d>bc/a$. Then $0<a<c$, $ad-bc>0$, $1\leq a<c(1-1/s_{0})$, and
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and
$n\in\mathbb{N}$. This completes the proof. ∎

We can change the condition $ad>bc$ in Theorem 2.12 and modify the proof to
obtain the following result.

######  Theorem 2.13.

Let $s_{0}>1$, $a$, $b$, $c$, $d$ satisfy the condition (A), $ad<bc$, and
$a+b<c+d$. If either $(a+b)^{s_{0}}\zeta(s_{0})<(c+d)^{s_{0}}$ or
$a+b<(c+d)(1-1/s_{0})$, then $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all
$n\in\mathbb{N}$ and for all $s\geq s_{0}$. In particular, for each $s_{0}>1$,
there are infinitely many nonnegative integers $a$, $b$, $c$, $d$ having the
above properties.

###### Proof.

Since $ad<bc$ and $a+b<c+d$, we have

$\frac{a}{c}<\frac{an+b}{cn+d}\leq\frac{a+b}{c+d}<1\quad\text{for all $n\geq
1$}.$

Following the proof of Theorem 2.12, if
$(a+b)^{s_{0}}\zeta(s_{0})<(c+d)^{s_{0}}$, $n\in\mathbb{N}$, and $s\geq
s_{0}$, then

$\displaystyle\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}$
$\displaystyle=\frac{\sigma_{s}(an+b)}{(an+b)^{s}}\left(\frac{an+b}{cn+d}\right)^{s}\frac{(cn+d)^{s}}{\sigma_{s}(cn+d)}$
$\displaystyle\leq\zeta(s)\left(\frac{a+b}{c+d}\right)^{s}\leq\zeta(s_{0})\left(\frac{a+b}{c+d}\right)^{s_{0}}<1.$

If $a+b<(c+d)(1-1/s_{0})$, then the above implies that for $s\geq s_{0}$ and
$n\in\mathbb{N}$,

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\zeta(s_{0})\left(\frac{a+b}{c+d}\right)^{s_{0}}\leq\frac{s_{0}}{s_{0}-1}\left(\frac{a+b}{c+d}\right)<1.$

The rest is easy, so the proof is complete. ∎

######  Example 2.14.

By using a computer, we see that $\sigma(2n+5)<\sigma(6n+17)$ for all $n\leq
10^{6}$ while

$\sigma_{1/2}(2n+5)<\sigma_{1/2}(6n+17)\quad\text{ for $n\leq 4$}$

and the inequality changes to $>$ when $n=5$. By Corollary 2.6, there are
infinitely many $n\in\mathbb{N}$ for which these inequalities are both $<$ or
both $>$, but we do not know if there exist infinitely many $n$ for which
these inequality are opposite. By Theorem 2.12, we have
$\sigma_{s}(2n+5)<\sigma_{s}(6n+17)$ and $\sigma_{s}(5n+4)<\sigma_{s}(6n+7)$
for all $n\in\mathbb{N}$ and $s\geq 3$. However, we do not know if there are
infinitely many $m\in\mathbb{N}$ for which the inequalities
$\sigma(2m+5)>\sigma(6m+17)$ and $\sigma(5m+4)>\sigma(6m+7)$ simultaneously
hold.

######  Problem 4.

Let $B=\\{s_{1},s_{2},\ldots,s_{k}\\}$ and
$C=\\{s_{k+1},s_{k+2},\ldots,s_{k+\ell}\\}$ be subsets of $[-1,1]$ and let
$a,b,c,d$ satisfy the condition (A). By Corollary 2.6, there are infinitely
many $m$ and $n$ such that

$\sigma_{s}(am+b)<\sigma_{s}(cm+d)\;\text{and}\;\sigma_{s}(an+b)>\sigma_{s}(cn+d)\;\text{for
all $s\in B\cup C$.}$

Are there infinitely many $n$ for which $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$
for all $s\in B$ and $\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $s\in C$?
Perhaps, the answer depends on $B$ and $C$. If $B,C\subseteq[1-\varepsilon,1]$
where $0<\varepsilon<1$ is very small and all elements of $B$ are less than
every element of $C$, is the above statement true? Similarly, suppose
$c_{2},d_{2}$ satisfy the condition (A) and $(a,b)$, $(c,d)$, $(c_{2},d_{2})$
are linearly independent over $\mathbb{Q}$. We know that there are infinitely
many $m,n\in\mathbb{N}$ for which $\sigma_{s}(am+b)<\sigma_{s}(cm+d)$ and
$\sigma_{s}(cn+d)<\sigma_{s}(c_{2}n+d_{2})$. Since $m$ and $n$ above may be
different, it is natural to ask if there are infinitely many $r\in\mathbb{N}$
such that $\sigma_{s}(ar+b)<\sigma_{s}(cr+d)<\sigma_{s}(c_{2}r+d_{2})$. If
$(a,b),(c,d),(c_{2},d_{2}),\ldots,(c_{\ell},d_{\ell})$ are linearly
independent over $\mathbb{Q}$, can we extend the above inequality to

$\sigma_{s}(ar+b)<\sigma_{s}(cr+d)<\sigma_{s}(c_{2}r+d_{2})<\cdots<\sigma_{s}(c_{\ell}r+d_{\ell})?$

######  Problem 5.

Suppose $0\leq s\leq 1$ and $a_{i},b_{i},c_{i},d_{i}$ are nonnegative
integers, $a_{i},c_{i}>0$ and $a_{i}d_{i}-b_{i}c_{i}\neq 0$, for each
$i=1,2,\ldots,\ell$. Are there infinitely many $n\in\mathbb{N}$ such that
$\sigma_{s}(a_{i}n+b_{i})<\sigma_{s}(c_{i}n+d_{i})$ for all
$i\in\\{1,2,\ldots,\ell\\}$? If $I,J\subseteq\\{1,2,\ldots,\ell\\}$ are
disjoint, are there infinitely many $n\in\mathbb{N}$ for which

$\sigma_{s}(a_{i}n+b_{i})<\sigma_{s}(c_{i}n+d_{i})\;\text{and}\;\sigma_{s}(a_{j}n+b_{j})>\sigma_{s}(c_{j}n+d_{j})$

for all $i\in I$ and $j\in J$? Are they true if the set of all $(a_{i},b_{i})$
and $(c_{i},d_{i})$ are linearly independent over $\mathbb{Q}$? Perhaps, there
exist some kind of admissible sets of $a_{i}$, $b_{i}$, $c_{i}$, $d_{i}$ to
guarantee that one of the above are true. Goldston, Graham, Pintz, and
Yildirim [5], and De Koninck and Luca [4] solved similar problems. Their ideas
may be useful in solving Problems 4 and 5 too.

######  Problem 6.

What is the infimum of $s_{0}$ such that $\sigma_{s}(2n+5)<\sigma_{s}(6n+17)$
and $\sigma_{s}(5n+4)<\sigma_{s}(6n+7)$ for all $n\in\mathbb{N}$ and $s\geq
s_{0}$? By Example 2.14 such the infimum is $\leq 3$. In general, if
$a_{i},b_{i},c_{i},d_{i}$ satisfy the conditions of Theorem 2.12 for all
$i=1,2,\ldots,\ell$, can we determine the infimum of $s_{0}$ such that
$\sigma_{s}(a_{i}n+b_{i})<\sigma_{s}(c_{i}n+d_{i})$ for all $s\geq s_{0}$,
$n\in\mathbb{N}$, and $i=1,2,\ldots,\ell$?

We consider (IE2) in the next subsection. We show that for each $s_{0}>1$, we
can find integers $a$, $b$, $c$, $d$ such that for all $s\geq s_{0}$,
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for an arbitrarily long string of
consecutive integers $n=1,2,\ldots,M$ and $\sigma_{s}(an+b)>\sigma_{s}(cn+d)$
for all large $n\geq N$. In addition, if we sacrifice the uniformity of $s$,
we can force $N$ to be $M+1$.

###  2.4. The second case for $|s|>1$

######  Theorem 2.15.

The following statements hold.

  * (i)

Let $s_{0}>1$ and $M\in\mathbb{N}$ be given. Suppose $a$, $b$, $c$, $d$ are
integers satisfying $b\geq 0$, $c\geq 1$, $a>c\zeta(s_{0})$, and

$d\geq\zeta(s_{0})b+(M+1)(a\zeta(s_{0})-c).$

Then $a>c>0$, $ad-bc>0$, and $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all
$s\geq s_{0}$ and $n=1,2,\ldots,M$ and there exists $N\in\mathbb{N}$ such that
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and $n\geq N$.

  * (ii)

Let $M\in\mathbb{N}$ be given. Suppose $a$, $b$, $c$, $d$ are integers
satisfying $c>b\geq 1$, $a>2c$, $d=(M+q)(a-c)+b$, where $q=q_{1}/q_{2}$,
$0<q_{1}<q_{2}$, $(q_{1},q_{2})=1$, and $q_{2}\mid a-c$. Then $a>c>0$, $ad-
bc>0$, and there exists $s_{0}>1$ such that
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and $n=1,2,\ldots,M$
and $\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $s\geq s_{0}$ and $n\geq M+1$.

######  Remark 2.16.

Obviously, there are infinitely many integers $a,b,c,d$ satisfying the
assumption of Theorem 2.15. So we can find as many examples for (IE2) as we
like. The integer $N$ in Theorem 2.15(i) may or may not be equal to $M+1$. So
(ii) does not immediately follow from (i). In addition, $s_{0}$ and $M$ in (i)
are given independently while $s_{0}$ in (ii) may depend on $M$ and $a$, $b$,
$c$, $d$. We do not know whether it is possible to obtain the result as in
(ii) but $M$ and $s_{0}$ are independent variables.

###### Proof of Theorem 2.15..

We first prove (i). Observe that

$a\zeta(s_{0})-c>a-c>0,\;d-b>d-\zeta(s_{0})b>0,\;ad-bc>0,$

and

$\frac{d-b}{a-c}\geq\frac{d-\zeta(s_{0})b}{a\zeta(s_{0})-c}>M.$

The inequality $(d-b)/(a-c)>M$ implies $an+b<cn+d$ for all $n\leq M$ and the
inequality $(d-\zeta(s_{0})b)/(a\zeta(s_{0})-c)>M$ leads to
$\zeta(s_{0})(aM+b)<cM+d$. Since $ad-bc>0$, the sequence
$((an+b)/(cn+d))_{n\geq 1}$ is increasing and therefore

$\frac{an+b}{cn+d}\leq\frac{aM+b}{cM+d}<\frac{1}{\zeta(s_{0})}<1\quad\text{for
all $n\leq M$}.$

Hence for $s\geq s_{0}$ and $n\leq M$, we obtain

$\displaystyle\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}$
$\displaystyle=\frac{\sigma_{s}(an+b)}{(an+b)^{s}}\left(\frac{an+b}{cn+d}\right)^{s}\frac{(cn+d)^{s}}{\sigma_{s}(cn+d)}$
(2.6)
$\displaystyle\leq\zeta(s)\left(\frac{aM+b}{cM+d}\right)^{s}\leq\zeta(s_{0})\left(\frac{aM+b}{cM+d}\right)<1,$

which implies $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$. It remains to show that
when $n$ is large enough, the inequality reverse. From (2.6), we see that for
$s\geq s_{0}$

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\geq\left(\frac{an+b}{cn+d}\right)^{s}\frac{1}{\zeta(s)}$

which converges, as $n\to\infty$, to

$\left(\frac{a}{c}\right)^{s}\frac{1}{\zeta(s)}>\frac{\zeta(s_{0})^{s}}{\zeta(s)}>1.$

So there exists $N\in\mathbb{N}$ such that $\sigma_{s}(an+b)>\sigma_{s}(cn+d)$
for all $n\geq N$. This $N$ can be chosen uniformly for all
$s\in[s_{0},\infty)$ in the sense that it depends on $s_{0}$, $a$, $b$, $c$,
$d$ but not on $s$ as follows. As $n\to\infty$, we have
$\left(\frac{an+b}{cn+d}\right)^{s_{0}}\to\left(\frac{a}{c}\right)^{s_{0}}>\zeta(s_{0})^{s_{0}}$.
Then there exists $N\in\mathbb{N}$ such that if $n\geq N$, then
$\left(\frac{an+b}{cn+d}\right)^{s_{0}}>\zeta(s_{0})^{s_{0}}$, and so for all
$s\geq s_{0}$ and $n\geq N$, we have $\frac{an+b}{cn+d}>1$ and

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\geq\left(\frac{an+b}{cn+d}\right)^{s}\frac{1}{\zeta(s)}\geq\left(\frac{an+b}{cn+d}\right)^{s_{0}}\frac{1}{\zeta(s)}>\frac{\zeta(s_{0})^{s}}{\zeta(s)}>1.$

Next, we prove (ii). The conditions on $q_{1}$ and $q_{2}$ make sure that

$q\in(0,1)$, $d\in\mathbb{Z}^{+}$, and $M<(d-b)/(a-c)<M+1$.

It is also obvious that $a>c>0$, $d>b$, and $ad-bc>0$. Let
$\alpha_{0}=(d-b)/b$. Then $b\alpha_{0}=(M+q)(a-c)>c>b$. So $\alpha_{0}>1$.
Let $\alpha=\min\\{\alpha_{0},2\\}$. Define functions
$f,g:[1,\alpha]\to\mathbb{R}$ by

$f(x)=\frac{d-bx}{ax-c}\quad\text{and}\quad g(x)=\frac{dx-b}{a-cx}.$

Then for $x\in(1,\alpha]$, we have

$\displaystyle dx-b$ $\displaystyle>d-bx\geq d-b\alpha\geq
d-b\alpha_{0}=d-(d-b)=b>0\quad\text{and}$ $\displaystyle ax-c$
$\displaystyle>a-cx\geq a-c\alpha\geq a-2c>0.$

Therefore $0<f(x)<g(x)$ for all $x\in(1,\alpha]$ and $M<f(1)=g(1)<M+1$. By
using the usual method in calculus, it is easy to verify that $f$ and $g$ are
continuous on $[1,\alpha]$, $f$ is decreasing on $[1,\alpha]$, and $g$ is
increasing on $[1,\alpha]$. Since $f(1)>M$, $\zeta(s)>1$, and $\zeta(s)\to 1$
as $s\to\infty$, there exists a real number $s_{1}>1$ such that
$\zeta(s)\in(1,\alpha)$ and $f(\zeta(s))>M$ for all $s\geq s_{1}$. Similarly,
since $M+1>g(1)$, there is a real number $s_{2}>1$ such that
$\zeta(s)\in(1,\alpha)$ and $g(\zeta(s))<M+1$ for all $s\geq s_{2}$. Let
$s_{0}=\max\\{s_{1},s_{2}\\}$. Then $s_{0}>1$,

$\zeta(s)\in(1,\alpha)\quad\text{and}\quad
M<f(\zeta(s))<g(\zeta(s))<M+1\quad\text{for all $s\geq s_{0}$}.$ (2.7)

Next, we show that $\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $s\geq s_{0}$
and $n\leq M$. Similar to the proof of the first part, the sequence
$\left((an+b)/(cn+d)\right)_{n\geq 1}$ is increasing and $aM+b<cM+d$. In
addition, the inequality $M<f(\zeta(s))$ in (2.7) implies that
$\zeta(s)(aM+b)<cM+d$. From these, we obtain, for all $s\geq s_{0}$ and $n\leq
M$,

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\leq\zeta(s)\left(\frac{an+b}{cn+d}\right)^{s}\leq\zeta(s)\left(\frac{aM+b}{cM+d}\right)^{s}<\zeta(s)\left(\frac{aM+b}{cM+d}\right)<1,$

as desired. Similarly, for $s\geq s_{0}$, we have $\zeta(s)<\alpha\leq 2$,
$a-c\zeta(s)>0$, and $g(\zeta(s))<M+1$, which implies
$\zeta(s)(c(M+1)+d)<a(M+1)+b$. Therefore, for all $s\geq s_{0}$ and $n\geq
M+1$,

$\frac{\sigma_{s}(an+b)}{\sigma_{s}(cn+d)}\geq\left(\frac{an+b}{cn+d}\right)^{s}\frac{1}{\zeta(s)}\geq\left(\frac{a(M+1)+b}{c(M+1)+d}\right)^{s}\frac{1}{\zeta(s)}>\zeta(s)^{s-1}>1.$

This completes the proof. ∎

By changing the role of $a,b,c,d$, we obtain the following corollary.

######  Corollary 2.17.

For each $s_{0}>1$ and $M\in\mathbb{N}$, there are integers $a,b,c,d,N$
satisfying $b,d\geq 0$, $0<a<c$, $ad-bc<0$, $N\geq M+1$ such that

$\displaystyle\sigma_{s}(an+b)>\sigma_{s}(cn+d)\quad\text{for all $s\geq
s_{0}$ and $n\leq M$}$
$\displaystyle\sigma_{s}(an+b)<\sigma_{s}(cn+d)\quad\text{for all $s\geq
s_{0}$ and $n\geq N$}.$

Furthermore, if $M\in\mathbb{N}$ is given, we can find the integers $a,b,c,d$
and real number $s_{0}>1$ as the above with the additional property that $N$
can be chosen to be $M+1$.

######  Example 2.18.

If $s_{0}=2$ and $M=999999$, then we obtain by Theorem 2.15(i) that we can
choose $c=2$, $b=1$, $a=5$, and $d=6224673$ to obtain
$\sigma_{s}(5n+1)<\sigma_{s}(2n+6224673)$ for all $s\geq 2$ and $n\leq 999999$
and $\sigma_{s}(5n+1)>\sigma_{s}(2n+6224673)$ for all $s\geq 2$ and $n\geq N$
for some large $N$. Suppose $M=9999$, $c=2$, $b=1$, $a=5$, $q=1/3$, and
$d=29999$. By the proof of Theorem 2.15(ii), we need to select $s_{1},s_{2}>1$
so that

$\frac{d-b\zeta(s_{1})}{a\zeta(s_{1})-c}>M\quad\text{and}\quad\frac{d\zeta(s_{2})-b}{a-c\zeta(s_{2})}<M+1,$

that is, $\zeta(s_{1})<\frac{49997}{49996}$ and
$\zeta(s_{2})<\frac{50001}{49999}$. We can use Wolfram Alpha to find an
estimate for $\zeta(s)$ by simply writing zeta$(s)$ and clicking enter. The
decimal expansion of $\zeta(16)$ is also given as Sequence A013674 in the
Online Encyclopedia of Integer Sequences. We see that we can take
$s_{1}=s_{2}=16$. So we choose $s_{0}=16$ and obtain that

$\displaystyle\sigma_{s}(5n+1)<\sigma_{s}(2n+29999)\quad\text{for all $s\geq
16$ and $n\leq 9999$},$
$\displaystyle\sigma_{s}(5n+1)>\sigma_{s}(2n+29999)\quad\text{for all $s\geq
16$ and $n\geq 10000$}.$

The number $s_{0}=16$ is not optimal but the results change when $s$ is
smaller than $13$. For each $s>1$, let $h(s)$ be the smallest positive integer
$n$ such that $\sigma_{s}(5n+1)>\sigma_{s}(2n+29999)$. So $h(s)=10000$ for all
$s\geq 16$. The values of $h(2),h(3),\ldots,h(15)$ are as follows:

$\displaystyle h(s)$ $\displaystyle=10,000\quad\text{for
$s\in\\{13,14,15,16\\}$},\quad h(s)=9999\quad\text{for $s\in\\{10,11,12\\}$},$
$\displaystyle h(9)$ $\displaystyle=9997,\quad h(8)=9991,\quad h(7)=9981,\quad
h(6)=9995$ $\displaystyle h(5)$ $\displaystyle=9883,\quad h(4)=9691,\quad
h(3)=9115,\quad h(2)=7207.$

######  Problem 7.

From Remark 2.16, prove or disprove that if $M$ is given and is very large,
then there exists $s_{0}>1$ such that if $1<s\leq s_{0}$, then there are no
integers $a,b,c,d$ satisfying $a>c>0$, $b,d\geq 0$, $ad-bc\neq 0$,
$\sigma_{s}(an+b)<\sigma_{s}(cn+d)$ for all $n\leq M$ and
$\sigma_{s}(an+b)>\sigma_{s}(cn+d)$ for all $n\geq M+1$.

######  Problem 8.

From Example 2.18, it may be interesting to study the behavior of the function
$h$ on $(1,16]$. In general, suppose $a,b,c,d,M,s_{0}$ satisfy the conditions
in Theorem 2.15(ii), and $h(s)$ is the smallest positive integer $n$ such that
$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign. Then $h(s)=M+1$ for all
$s\geq s_{0}$. Can we describe the behavior of $h$ on $(1,s_{0}]$?

Recall that $\left\lceil s\right\rceil$ is the smallest integer larger than or
equal to $s$. Next, we construct an example for (IE3).

###  2.5. The third case for $|s|>1$

######  Theorem 2.19.

Let $s>0$ and $n=\left\lceil s\right\rceil$ be given. If $p$ is a prime larger
than $1+n2^{n+1}$, then $\sigma_{s}(p-1)>\sigma_{s}(p)$ and
$\sigma_{s}(p)<\sigma_{s}(p+1)$. In particular, there are infinitely many
$m,r\in\mathbb{N}$ such that

$\sigma_{s}(m)>\sigma_{s}(m+1)\;\text{and}\;\sigma_{s}(r)<\sigma_{r}(r+1).$

###### Proof.

Suppose $p>1+n2^{n+1}$. Then $\sigma_{s}(p+1)\geq
1+(p+1)^{s}>1+p^{s}=\sigma_{s}(p)$. For the other inequality, we observe that
$n/(p-1)<1/2^{n+1}$ and

$\displaystyle\left(1+\frac{1}{p-1}\right)^{s}$
$\displaystyle\leq\left(1+\frac{1}{p-1}\right)^{n}=\sum_{k=0}^{n}{n\choose
k}\left(\frac{1}{p-1}\right)^{k}$
$\displaystyle\leq\sum_{k=0}^{n}\left(\frac{n}{p-1}\right)^{k}<\sum_{k=0}^{n}\left(\frac{1}{2^{n+1}}\right)^{k}<1+\sum_{k=1}^{\infty}\frac{1}{2^{n+k}}$
$\displaystyle=1+\frac{1}{2^{n}}\leq 1+\frac{1}{2^{s}}.$

Then $\sigma_{s}(p-1)-\sigma_{s}(p)\geq 1+((p-1)/2)^{s}+(p-1)^{s}-1-p^{s}$,
which is equal to

$(p-1)^{s}\left(1+\frac{1}{2^{s}}-\left(1+\frac{1}{p-1}\right)^{s}\right)>0.$

Therefore $\sigma_{s}(p-1)>\sigma_{s}(p)$ and $\sigma_{s}(p)<\sigma_{s}(p+1)$,
as required. Since there are infinitely many such $p$, we can take $m=p-1$ and
$r=p$ to obtain infinitely many $m,r\in\mathbb{N}$ as desired. ∎

By Theorem 2.10, in order to construct an example for (IE3), it is easier (may
be necessary) to consider the case $a=c$. Then we have a generalization of
Theorem 2.19 as follows.

######  Theorem 2.20.

Suppose $s>0$, $a\in\mathbb{N}$, $b,d$ are distinct nonnegative integers, and
$(a,b)=(a,d)=1$. Then there are infinitely many $m,n\in\mathbb{N}$ such that
$\sigma_{s}(am+b)<\sigma_{s}(am+d)$ and $\sigma_{s}(an+b)>\sigma_{s}(an+d)$.

###### Proof.

The statement is symmetric with respect to $b$ and $d$, so we can assume
without loss of generality that $b<d$. Since $(a,b)=1$, there are infinitely
many $m\in\mathbb{N}$ such that $am+b$ is prime, and therefore

$\sigma_{s}(am+b)=1+(am+b)^{s}<1+(am+d)^{s}\leq\sigma_{s}(am+d).$

Next, let $\ell=d-b$, $k=\left\lceil s\right\rceil$, and $q$ a prime with
$q\nmid a\ell$. Then $(\ell,q)=(a,q)=(a,d)=1$. By Chinese remainder theorem
and Dirichlet’s theorem for primes in arithmetic progressions, there are
infinitely many primes $p$ such that

$p\equiv\ell\pmod{q}$, $p\equiv d\pmod{a}$, $p>d$, and $p>\ell+\ell kq^{k+1}$.

For each such $p$, let $n=n_{p}=(p-d)/a$. Then
$\sigma_{s}(an+d)=\sigma_{s}(p)=1+p^{s}$, $an+b=p-d+b=p-\ell$, and so
$\sigma_{s}(an+b)\geq 1+(p-\ell)^{s}+((p-\ell)/q)^{s}$. Then
$\sigma_{s}(an+b)-\sigma_{s}(an+d)\geq(p-\ell)^{s}(1+1/q^{s})-p^{s}$. To show
that $\sigma_{s}(an+b)>\sigma_{s}(an+d)$, it is enough to show that
$1+1/q^{s}>p^{s}/(p-\ell)^{s}$. We have

$\displaystyle\left(\frac{p}{p-\ell}\right)^{s}$
$\displaystyle=\left(1+\frac{\ell}{p-\ell}\right)^{s}\leq\left(1+\frac{\ell}{p-\ell}\right)^{k}$
$\displaystyle=\sum_{j=0}^{k}{k\choose
j}\left(\frac{\ell}{p-\ell}\right)^{j}\leq\sum_{j=0}^{k}\left(\frac{k\ell}{p-\ell}\right)^{j}.$

Since $k\ell/(p-\ell)<1/q^{k+1}$, the above is less than

$1+\frac{1}{q^{k+1}}+\frac{1}{q^{k+2}}+\frac{1}{q^{k+3}}+\cdots=1+\frac{1}{(q-1)q^{k}}\leq
1+\frac{1}{q^{k}}\leq 1+\frac{1}{q^{s}}.$

So the proof is complete. ∎

######  Problem 9.

Suppose $s>1$ and $a,b,c,d$ are positive integers. If

$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign infinitely often,

is it true that $a=c$? If it is not true, assuming further that $s$ is large
and $(a,b)=(c,d)=1$, can we conclude that $a=c$?

######  Problem 10.

By Theorem 2.4, $\sigma(30n+1)-\sigma(30n)$ has infinitely many sign changes
but it may be interesting to know more about this. For example, is it true
that

$\text{(i)}\quad\sum_{\begin{subarray}{c}n\leq m\\\
\sigma(30n+1)<\sigma(30n)\end{subarray}}1>\sum_{\begin{subarray}{c}n\leq m\\\
\sigma(30n+1)>\sigma(30n)\end{subarray}}1\quad\text{for all
$m\in\mathbb{N}$?}$

Is it true that

$\text{(ii)}\quad\sum_{n\leq m}\sigma(30n)>\sum_{n\leq
m}\sigma(30n+1)\quad\text{for all $m\in\mathbb{N}$?}$

Numerical evidence suggests that they are true but we currently do not have a
proof. If they are not true, do the sign reverse for infinitely many $m$? We
can replace $30n+1$ and $30n$ by $an+b$ and $cn+d$ and we can also change
$\sigma$ to $\sigma_{s}$, or any other function of interest. Perhaps, it is
true that

$\text{(iii)}\quad\sum_{\begin{subarray}{c}n\leq m\\\
\sigma(30n+1)<\sigma(30n)\end{subarray}}\frac{1}{n}>\sum_{\begin{subarray}{c}n\leq
m\\\ \sigma(30n+1)>\sigma(30n)\end{subarray}}\frac{1}{n}.$

Maybe, the left-hand side of (iii) divided by $\log m$ is closed to $1$ as
$m\to\infty$ while the right-hand side of (iii) divided by $\log m$ is closed
to $0$ as $m\to\infty$. This question is motivated by those on primes. So it
should be useful to read, for example, the articles by Bays and Hudson [2],
Knapowski and Turan [10, 11, 12], and Meng [16]. See also [20, 25, 26] and
some of our future articles for more information on palindromes and the
comparison between the number of palindromes in different bases.

######  Problem 11.

Let $J_{s}$ and $\varphi_{s}$ be the arithmetic functions that are defined for
all $n\in\mathbb{N}$ by

$J_{s}(n)=n^{s}\prod_{p\mid
n}\left(1-\frac{1}{p^{s}}\right)\quad\text{and}\quad\varphi_{s}(n)=\sum_{\begin{subarray}{c}1\leq
m\leq n\\\ (m,n)=1\end{subarray}}m^{s}.$

So $J_{1}(n)=\varphi(n)=\varphi_{0}(n)$ and therefore $J_{s}$ and
$\varphi_{s}$ are generalizations of the Euler function $\varphi$. What are
the corresponding results for $J_{s}(an+b)$, $J_{s}(cn+d)$,
$\varphi_{s}(an+b)$, and $\varphi_{s}(cn+d)$. There are other generalizations
of $\varphi$ which may be of interest. The inequalities related to
$\sigma_{s}$, $\varphi_{s}$, and $J_{s}$ over the Fibonacci numbers are also
investigates in [6, 14]. For some recent articles related to divisibility
properties of the Fibonacci numbers, see for example in [18, 19, 21].

######  Problem 12.

We already showed that the following three cases may occur:

  * (i)

$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ never changes sign,

  * (ii)

$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign exactly once,

  * (iii)

$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign infinitely many times.

Is it possible to construct an example for which
$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$ changes sign exactly two times? If $k$ is
a given positive integer, can we find $s\in\mathbb{R}$, $a,b,c,d\geq 0$ such
that there are exactly $k$ sign changes in
$\sigma_{s}(an+b)-\sigma_{s}(cn+d)$?

We can replace $\sigma$ by $\omega$ and $\Omega$ and obtain the same results
in Theorem 2.4. Here $\omega(n)$ is the number of distinct prime divisors of
$n$ and $\Omega(n)$ is the number of prime powers dividing $n$. We record it
as a theorem.

######  Theorem 2.21.

Let $a,b,c,d$ satisfy the condition (A). Then there exists a strictly
increasing sequence $(n_{k})$ of positive integers such that

${\rm(i)}\lim_{k\to\infty}\frac{\omega(an_{k}+b)}{\omega(cn_{k}+d)}=\lim_{k\to\infty}\frac{\Omega(an_{k}+b)}{\Omega(cn_{k}+d)}=0.$

In particular,

$\displaystyle\text{{\rm(ii)}
$\displaystyle\liminf_{n\to\infty}\frac{\omega(an+b)}{\omega(cn+d)}=\liminf_{n\to\infty}\frac{\Omega(an+b)}{\Omega(cn+d)}=0$};$
(iii)
$\displaystyle\limsup_{n\to\infty}\frac{\omega(an+b)}{\omega(cn+d)}=\limsup_{n\to\infty}\frac{\Omega(an+b)}{\Omega(cn+d)}=\infty$.

###### Proof.

We construct the sequence $(n_{k})$ in exactly the same way as in the proof of
Theorem 2.4. Then

$\displaystyle\omega(an_{k}+b)$ $\displaystyle=\omega(\delta q_{k})\leq
1+\omega(|ad-bc|),$ $\displaystyle\Omega(an_{k}+b)$
$\displaystyle=\Omega(\delta q_{k})\leq 1+\Omega(|ad-bc|),$
$\displaystyle\omega(cn_{k}+d)$
$\displaystyle=\omega(m_{k}y_{k})\geq\omega(m_{k})\to\infty\;\text{as
$k\to\infty$},$ $\displaystyle\Omega(cn_{k}+d)$
$\displaystyle=\Omega(m_{k}y_{k})\geq\Omega(m_{k})\to\infty\;\text{as
$k\to\infty$}.$

These imply the desired results. ∎

######  Problem 13.

We can extend the functions $\omega$ and $\Omega$ by defining

$\omega_{s}(n)=\sum_{p\mid
n}p^{s}\quad\text{and}\quad\Omega_{s}(n)=\sum_{p^{k}\parallel
n}kp^{s}\quad\text{for all $n\in\mathbb{N}$}.$

What are the corresponding results for $\omega_{s}$ and $\Omega_{s}$ over
arithmetic progressions? Some results on $\omega(F_{n})$ and $\omega(L_{n})$
are obtained in [3] and [24].

######  Problem 14.

It may be interesting to compare $f(A_{an+b})$ and $f(A_{cn+d})$, where $f$ is
an arithmetic function and $(A_{n})_{n\geq 1}$ is an integer sequence which is
of interest. For example, suppose $F_{n}$ is the $n$th Fibonacci number, can
we say anything about the behavior of $\sigma_{s}(F_{an+b})$ and
$\sigma_{s}(F_{cn+d})$? The order (or rank) of appearance of $n$ in the
Fibonacci sequence, denoted by $z(n)$, is the smallest positive integer $m$
such that $n\mid F_{m}$. The function $z$ is not multiplicative but is closed
to being multiplicative because

$\displaystyle z(\operatorname{lcm}[m,n])$
$\displaystyle=\operatorname{lcm}[z(m),z(n)],\;\text{ and so}$ $\displaystyle
z(p_{1}^{a_{1}}p_{2}^{a_{2}}\cdots p_{k}^{a_{k}})$
$\displaystyle=\operatorname{lcm}[z(p_{1}^{a_{1}}),z(p_{2}^{a_{2}}),\ldots,z(p_{k}^{a_{k}})],$

where $p_{1},p_{2},\ldots,p_{k}$ are distinct primes and
$a_{1},a_{2},\ldots,a_{k}$ are positive integers. Can we compare $z(an+b)$ and
$z(cn+d)$? Some formulas concerning $z(n)$ when $n$ is of special forms are
shown in [9, 22, 23] and in the references of these articles. We may also
replace $z$ by any other interesting arithmetic functions.

######  Problem 15.

Define $\sigma_{s}(n,q,a)$ by

$\sigma_{s}(n,q,a)=\sum_{\begin{subarray}{c}d\mid n\\\ d\equiv a\
(\mathrm{mod}\ q)\end{subarray}}d^{s}.$

What are the results on the inequalities between $\sigma_{s}(n,q,a_{1})$ and
$\sigma_{s}(n,q,a_{2})$? For example, if $q=2$, we consider the inequalities
between the sum of odd divisors of $n$ and even divisors of $n$. Are there an
infinite number of sign changes in $\sigma_{s}(n,2,0)-\sigma_{s}(n,2,1)$ or in
$\sum_{n\leq x}\sigma_{s}(n,2,0)-\sum_{n\leq x}\sigma_{s}(n,2,1)$? The answers
may generally depend on $s,n,q,a$. We can define $\omega_{s}(n,q,a)$ and
$\Omega_{s}(n,q,a)$ in a similar way. For some results in this direction, see
for example in the work of Khan [8], Liu, Shparlinski, and Zhang [13], Meng
[16] and Pongsriiam and Vaughan [27, 28, 29], and references therein. If we
are interested in other kinds of divisors, we may consider the comparison
between the sums of those divisors. Define $\sigma_{s,A}(n)=\sum_{d\in
A(n)}d^{s}$ for all $n\in\mathbb{N}$, where $A(n)$ is, for example, the
squarefree divisors of $n$ or the unitary divisors of $n$. There are many
other possible research problems. We leave them to the reader’s imagination.

### Acknowledgements

This project is funded by the National Research Council of Thailand (NRCT),
Grant Number NRCT5-RSA63021-02.

## References

  * [1] J. M. Aldaz, A. Bravo, S. Gutiérrez, and A. Ubis, _A theorem of D. J. Newman on Euler’s $\varphi$ function and arithmetic progressions_, Amer. Math. Monthly, 108 (2001), 364–367.
  * [2] C. Bays and R. H. Hudson, _A new bound for the smallest $x$ with $\pi(x)>\text{Li}(x)$_, Math. Comp., 69 (2000), 1285–1296.
  * [3] Y. Bugeaud, F. Luca, M. Mignotte, and S. Siksek, _On Fibonacci numbers with few prime divisors_ , Proc. Japan Acad. Ser. A Math Sci., 81 (2005), 17–20.
  * [4] J. M. De Koninck and F. Luca, _Arithmetic functions monotonic at consecutive arguments_ , Stud. Sci. Math. Hung., 51(2) (2014), 155–164.
  * [5] D. A. Goldston, S. W. Graham, J. Pintz, and C. Y. Yildirim, _Small gaps between almost primes, the parity problem, and some conjecture of Erdös on consecutive integers_ , Int. Math. Res. Notices, 7 (2011), 1439–1450.
  * [6] M. Jaidee and P. Pongsriiam, _Arithmetic functions of Fibonacci and Lucas numbers_ , Fibonacci Quart., 57(3) (2019), 246–254.
  * [7] D. Jarden, _Recurring Sequences_ , Riveon Lematematika, Jerusalem, 1973.
  * [8] R. Khan, _The divisor function in arithmetic progressions modulo prime powers_ , Mathematika, 62 (2016), 898–908.
  * [9] N. Khaochim and P. Pongsriiam, _On the order of appearance of products of Fibonacci numbers_ , Contrib. Discrete Math., 13(2) (2018), 45–62.
  * [10] S. Knapowski and P. Turan, _Comparative prime number theory VIII_ , Acta Math. Acad. Sci. Hung., 14 (1963), 251–268.
  * [11] S. Knapowski and P. Turan, _Further developments in the comparative prime number theory VI_ , Acta Arith., 12 (1966), 85–96.
  * [12] S. Knapowski and P. Turan, _Further developments in the comparative prime number theory VII_ , Acta Arith., 21 (1972), 193–201.
  * [13] K. Liu, I. Shparlinski, and T. Zhang, _Divisor problem in arithmetic progressions modulo a prime power_ , Adv. Math., 325 (2018), 459–481.
  * [14] F. Luca, _Arithmetic functions of Fibonacci numbers_ , Fibonacci Quart., 37(3) (1999), 265–268.
  * [15] G. Martin, _The smallest solution of $\phi(3n+1)<\phi(30n)$ is $\ldots$_, Amer. Math. Monthly, 106 (1999), 449–451.
  * [16] X. Meng, _Number of prime factors over arithmetic progressions_ , Q. J. Math., 71(1) (2020), 97–121.
  * [17] D. J. Newman, _Euler’s $\phi$ function on arithmetic progressions_, Amer. Math. Monthly, 104 (1997), 256–257.
  * [18] K. Onphaeng and P. Pongsriiam, _Exact divisibility by powers of the integers in the Lucas sequence of the first kind_ , AIMS Math., 5(6) (2020), 6739–6748.
  * [19] K. Onphaeng and P. Pongsriiam, _Exact divisibility by powers of the integers in the Lucas sequences of the first and second kinds_ , AIMS Math., 6(11) (2021), 11733–11748.
  * [20] P. Phunphayap and P. Pongsriiam, _Reciprocal sum of palindromes_ , J. Integer Seq., 22(8) (2019), Article 19.8.6
  * [21] P. Phunphayap and P. Pongsriiam, _Explicit formulas for the $p$-adic valuations of Fibonomial coefficients II_, AIMS Math., 5(6) (2020), 5685–5699.
  * [22] P. Pongsriiam, _A complete formula for the order of appearance of the powers of Lucas numbers_ , Commun. Korean Math. Soc., 31(3) (2016), 447–450.
  * [23] P. Pongsriiam, _The order of appearance of factorials in the Fibonacci sequence and certain Diophantine equations_ , Period. Math. Hungar., 79(2) (2019), 141–156.
  * [24] P. Pongsriiam, _Fibonacci and Lucas numbers which have exactly three prime factors and some unique properties of $F_{18}$ and $L_{18}$_, Fibonacci Quart., 57(5) (2019), 130–144.
  * [25] P. Pongsriiam, _Longest arithmetic progressions of palindromes_ , J. Number Theory, 222 (2021), 362–375.
  * [26] P. Pongsriiam and K. Subwattanachai, _Exact formulas for the number of palindromes up to a given positive integer_ , Int. J. Math. Comput. Sci., 14(1) (2019), 27–46.
  * [27] P. Pongsriiam and R. C. Vaughan, _The divisor function on residue classes I_ , Acta Arith., 168(4) (2015), 369–381.
  * [28] P. Pongsriiam and R. C. Vaughan, _The divisor function on residue classes II_ , Acta Arith., 182(2) (2018), 133–181.
  * [29] P. Pongsriiam and R. C. Vaughan, _The divisor function on residue classes III_ , Ramanujan J., accepted, online first version available at https://link.springer.com/article/10.1007/s11139-020-00288-5


# An autonomous robot for pruning modern, planar fruit trees

Alexander You1, Nidhi Parayil1, Josyula Gopala Krishna1, Uddhav Bhattarai2,
Ranjan Sapkota2, Dawood Ahmed2, Matthew Whiting2, Manoj Karkee2, Cindy M.
Grimm1, and Joseph R. Davidson1 This research is supported in part by USDA-
NIFA through the Agriculture and Food Research Initiative, Agricultural
Engineering Program (award No. 2020-67021-31958) and the AI Research
Institutes program supported by NSF and USDA-NIFA under the AI Institute:
Agricultural AI for Transforming Workforce and Decision Support (AgAID) (award
No. 2021-67021-35344).1Collaborative Robotics and Intelligent Systems
Institute (CoRIS), Oregon State University, Corvallis OR 97331, USA
{youa,parayiln,josyulag,cindy.grimm,joseph.davidson}
@oregonstate.edu2Center for Precision and Automated Agricultural Systems
(CPAAS), Washington State University, Prosser WA 99350, USA
{uddhav.bhattarai,ranjan.sapkota,dawood.ahmed,
<EMAIL_ADDRESS>
###### Abstract

Dormant pruning of fruit trees is an important task for maintaining tree
health and ensuring high-quality fruit. Due to decreasing labor availability,
pruning is a prime candidate for robotic automation. However, pruning also
represents a uniquely difficult problem for robots, requiring robust systems
for perception, pruning point determination, and manipulation that must
operate under variable lighting conditions and in complex, highly unstructured
environments. In this paper, we introduce a system for pruning sweet cherry
trees (in a planar tree architecture called an upright fruiting offshoot
configuration) that integrates various subsystems from our previous work on
perception and manipulation. The resulting system is capable of operating
completely autonomously and requires minimal control of the environment. We
validate the performance of our system through field trials in a sweet cherry
orchard, ultimately achieving a cutting success rate of 58%. Though not fully
robust and requiring improvements in throughput, our system is the first to
operate on fruit trees and represents a useful base platform to be improved in
the future.

###### Index Terms:

Dormant pruning, agricultural robotics, robotic pruning, closed-loop control,
perception

##  I Introduction

The production of high-value tree fruit crops such as fresh market apples,
pears, and cherries requires a large, seasonal workforce. After harvesting,
the most labor-intensive orchard activity is dormant season pruning (i.e.
after leaf drop) [1], a critical perennial operation required to maintain tree
health and produce high yields of quality fruit. Pruning rejuvenates the tree,
replacing unproductive wood with new fruiting sites. However, pruning is also
a repetitive, strenuous, and sometimes dangerous task involving workers
standing on ladders on uneven terrain with sharp cutting tools. Furthermore,
although not as time-constrained as harvesting, pruning does require skilled
workers that are increasingly difficult to find given the increased
uncertainty in the general availability of agricultural labor [2]. As a result
of these factors — plus rising production costs — the tree fruit industry is
highly motivated to transition to robotic pruning.

Unfortunately, outdoor agricultural environments are some of the most
difficult places for robots to operate in. Common factors that negatively
affect performance include variable lighting conditions, unstructured
environments, and suboptimal terrain that can affect mobility. For pruning in
particular, the main challenges lie in perception and manipulation. Pruning
systems have, in the past, required global models of the plant in order to
reconstruct a 3D model for determining pruning points, a task made difficult
by how thin branches are as well as the inherent complexity of plant
structures. Once the system determines the pruning points, it must maneuver a
pruning implement to the desired pruning point, an operation which demands
high precision, collision avoidance, and error robustness. These challenges
have prevented pruning robots from achieving widespread deployment – there are
no commercially available robotic pruning systems for trees.

Figure 1: _(Top left)_ A diagram of a UFO cherry tree structure, including the
side branches to be pruned from the vertical leaders. _(Top right and bottom
left)_ Our pruning robot uses a manipulator mounted on a mobile base with an
eye-in-hand RGB-D sensor and electric bypass shears. _(Bottom right)_
Segmented image taken during the approach to the pruning point.

In this paper, we present an integrated system (Figure 1) that advances the
state of the art in sensing capabilities for pruning. Our system, once driven
in front of a target tree, is capable of autonomously detecting pruning
targets, moving towards them, and then executing precision cuts, representing
our most complete end-to-end system to date and the first such system to be
tested on fruit trees. To validate our concept, we chose an orchard system
with simple pruning rules and then evaluated the robot in realistic field
conditions. The system is capable of operating completely autonomously, though
for our experiments we incorporate human intervention at a limited number of
points for safety-critical operations. We demonstrate an overall success rate
of 58%, successfully cutting 22 out of 38 detected branches. Though the
throughput is currently slow, with an average cutting time of 35.1s per cut,
our system represents a solid foundation from which we can continue to improve
our subsystems to achieve fast, accurate, and completely autonomous pruning.

The paper is laid out as follows. First, we discuss prior work on pruning in
Section II. We describe the environment, orchard system, and horticultural
goals of pruning in Section III. We then provide an overview of our pruning
procedure and describe in detail the hardware (Section IV) and technical
components of our system (Section V). Finally, we discuss the physical field
trial that we conducted with the pruning system (Section VI), followed by an
analysis of its performance (Section VII).

##  II Related Work

A recent review article by Bac et al. [3] discusses 50 different robotic
harvesting systems developed up to 2014. Compared to harvesting, the prior
work on robotic pruning remains relatively sparse, though recently there has
been an increase in interest, covering aspects such as tree modeling for
pruning point detection [4], pruning manipulator design [5, 6], path planning
[7], and manipulator control [8]. Some examples of research prototype end-to-
end systems for fruit-related pruning include Botterill et al. [9], Vision
Robotics [10], and the Bumblebee system [11], all of which focus on
grapevines. There has also been work on automated pruning for
landscapes/gardens, such as the Trimbot2020 system [12] that performs rose
pruning and bush trimming.

Focusing on the grapevine pruning robots, our system differs from these works
in several key aspects. First, these systems focus heavily on reproducing 3D
structures via stereo cameras in controlled lighting conditions to determine
pruning points. In contrast, we focus on a tree architecture with relatively
simple pruning rules (i.e. trimming lateral branches from the main branches).
As such, we do not require 3D reconstructions of the entire tree to determine
pruning points, allowing us to forgo depth-based data nearly entirely. Also,
all of the previous systems featured sophisticated methods for controlling the
lighting of the environment: Vision Robotics and Botterill et al. utilize a
trailer towed by a tractor that completely encompasses the plant of interest,
while the Bumblebee system utilizes a sophisticated lighting system to control
the exposure of the images used to reconstruct the point clouds [13]. Similar
trailer systems have been developed for fruit trees for tasks such as fruit
yield measurement [14]. However, it is clear that using such setups
significantly increases the complexity and/or unwieldiness of the system. In
our work, we perform pruning in an unmodified outdoor environment by taking
advantage of optical flow from camera movement to segment out important parts
of the scene. This allows us to use a single RGB-D camera with no
modifications to the environment.

##  III Problem Statement: Pruning rules

In this work, our focus is on dormant pruning of sweet cherry trees trained in
an upright fruiting offshoot (UFO) [15] configuration (Figure 1). UFO trees
are characterized by the presence of multiple long leader branches that grow
vertically from a horizontal support branch. The trees in our test orchard are
trained in a V-shaped trellis configuration where each wall is tilted
approximately 40 degrees. UFO cherry trees typically produce the most fruit on
new spurs and near the base of 1-year-old shoots, and so the recommended
pruning rule for UFO trees is simply to cut off sufficiently long side
branches extending from the leaders [16]. In our previous work [17], we
developed a skeletonization algorithm for identifying the entire structure of
the tree from a global point cloud. This subsequently allowed us to extract
the locations of the side branches and target potential pruning points.
However, since the pruning rules are so simple for this particular orchard
system, here we make the assumption that the side branches can be identified
from a close-up local view of the scene without the need for sophisticated 3D
modeling. We utilize this assumption about locality to run a local scanning
routine that attempts to detect and cut as many lateral side branches as
possible.

##  IV System Overview

Figure 2: Our pruning setup, consisting of a Universal Robots UR5e robot
mounted on a linear axis. The end effector consists of a set of electric
bypass pruners along with a RealSense D435 RGBD camera.

Our hardware setup is shown in Figure 2. The robot consists of a 6 degree-of-
freedom (DoF) Universal Robots (Odense, Denmark) UR5e manipulator mounted on
an actuated prismatic axis (for a total of 7 DoF). The prismatic axis has a
travel range of 1m and consists of a heavy duty linear slide actuated by a
Nema 23 stepper motor with a lead screw transmission. Control of the prismatic
axis is via a microcontroller and serial communication. For field trials, the
robot is installed on the back of a utility vehicle and powered with a
portable generator.

The eye-in-hand pruning end-effector integrates battery-operated electric
bypass pruners, controllable via serial communication, with an Intel (Santa
Clara, CA, USA) RealSense D435 RGB-D camera. The camera is located above the
cutters and pitched downwards at an angle of 10 degrees so that the top blade
is visible when the pruners are open. The shears are rated for cutting
branches up to 3.2 cm in diameter (https://salemmaster.com/).

We control the robot using the Universal Robot’s ROS driver running on Ubuntu
18.04. The computer vision algorithms (V-B2) were executed on a separate Dell
XPS-15 laptop equipped with a NVIDIA GeForce GTX 1050 Ti graphics card running
Windows 10. These algorithms represent the main bottleneck for system
execution speed. Vision-based controller commands were computed on the Windows
computer and sent via serial communication to the ROS computer, which in turn
relayed the commands to the robot arm.

##  V Pruning procedure

Figure 3: Execution flow chart of the pruning system. At each vehicle
location, we first initialize the system to its starting state. We then
alternate between two steps: moving to the next waypoint and detecting pruning
points, followed by operating on each of the detected pruning points. (Top
right) An illustration of the 28 waypoint scanning procedure used to locate
pruning points.

In this section, we discuss the operation of our pruning system and the
various essential subcomponents/algorithms. Our approach is motivated by two
key factors. First, trees are wider than the field of view for a single camera
positioned on the vehicle, requiring scanning. Second, we would like to reduce
kinematic path planning challenges. This led us to a “pan and scan” through a
set of fixed waypoints (upper right of Figure 3) to identify potential pruning
points. For each potential pruning point we start at the waypoint and use a
hybrid controller to execute the actual cut.

Figure 3 shows the execution flow chart for pruning. At each pruning location
(i.e. the vehicle is parked in front of a tree), the robot moves to a set of
waypoints, performing a scanning motion across the trellis. At each waypoint,
the robot acquires a set of two RGB images that are used to detect potential
pruning points in the environment. Once pruning points are identified and
converted to 3D position estimates, the robot plans to an approach pose in
front of the target. Once there, the robot executes a hybrid controller that
uses feedback from the RGB camera and the robot’s force-torque sensor to guide
the cutters to enclose the target branch, at which point we execute the cut.
We include human intervention at this step to prevent unintended cuts to the
tree or trellis.

In the following sections, we describe the details for each of the system
components. We assume that the vehicle has already been driven to a suitable
location for pruning.

###  V-A Waypoint movement

Our scanning routine visits a set of 28 predetermined waypoints in a zigzag
shape (Figure 3). Each waypoint consists of one of four positions for the
prismatic axis (0, 0.2, 0.4, 0.6m) and one of seven pre-configured manipulator
poses. These poses are spaced 10cm apart on the vertical axis of the angled
trellis plane such that the tool is oriented orthogonally to the trellis. We
use the zigzag shape to avoid large joint movements between waypoints that
could lead to collisions with the trellis wall. Planning between joint
waypoints is done using the RRT-Connect algorithm [18], implemented via the
Open Motion Planning Library [19] in ROS.

###  V-B Pruning point estimation

Figure 4: Pipeline for the detection of pruning points. We perform a semantic
segmentation of the scene (branches are red and the cutter is cyan) by
utilizing optical flow data computed from 2 RGB images. We feed the branch
mask into a Mask R-CNN network to perform instance segmentation of different
branch components and process the resulting instances to obtain pixel
estimates for pruning points. Note that in the instance above, point 1 is an
example of a spur erroneously detected by the algorithm as a pruning candidate
which we manually choose to skip.

Once our system has reached a waypoint, the next step is to identify the
potential pruning points at that location. This is accomplished by acquiring
images of the scene and feeding them through a three step process,
demonstrated in Figure 4. In the first step, we run a semantic segmentation
algorithm that identifies parts of the image that correspond to foreground
tree branches (Section V-B1). We then use the branch segmentation and feed it
into an instance segmentation network tasked with identifying leader branches
and prunable side branches (Section V-B2). We then execute an intersection
detection algorithm which attempts to find intersections between candidate
side branches and leaders, yielding pixel estimates for pruning points which
can be converted into 3D position estimates (Section V-B3). Notably, our
pruning procedure relies on the assumption that a local view of the scene is
sufficient for determining valid pruning points.

####  V-B1 Branch segmentation

The first step in the pruning point detection pipeline is to perform semantic
segmentation on the image in the current view. Our goal is to segment out two
important features in the image: branches in the foreground of the image as
well as the top blade of the cutter. Orchard environments can be very noisy,
and often a single RGB image of a scene will not suffice to robustly determine
which parts of the image are in the foreground versus the background.

We choose to use the methodology described in our previous work [20] in which
we train the pix2pix [21] generative adversarial network (GAN) to perform the
segmentation. In lieu of using depth data to filter out the background, as is
often done in other agricultural work using RGB-D cameras, we choose to
compute the dense optical flow (i.e. pixel movement speed) using the SegFlow2
network [22] between an image obtained from a second position offset 1.5cm in
the y-axis of the tool frame. Once the optical flow is obtained, we stack it
with the primary RGB image and feed it through the trained GAN to obtain a
2-channel output. The first channel corresponds to the branches in the scene
(red), and the second channel corresponds to the cutter blades (cyan).

Figure 5: Examples of simulated data used to train the orchard segmentation
network: RGB image (upper left), computed optical flow from a second RGB image
(upper right), and the cutter and branch masks (bottom).

All of the methodologies we used were the same as before, except we included a
channel in the segmentation output for the cutter. We utilized the same
simulated Blender environment but included a model of the cutter in the camera
view. In each randomized image, we added noise to the the pose of the cutter
relative to the camera to account for imperfectly mounting the camera on the
end effector. An example of the simulated data used to train the network is
shown in Figure 5.

####  V-B2 Instance segmentation

Figure 6: An example of a labeled image, showing 5 labeled classes of
foreground objects: leaders, side branches, small spurs, “other” branches
(usually offscreen branches that do not definitively fit in one of the former
categories), and non-branch objects.

Once we obtain the branch mask for the scene, the next step is to take the
mask and identify individual branches. For this, we use the Mask R-CNN [23]
instance segmentation network, provided through the Detectron2 library [24].
Mask R-CNN takes in an image and outputs a set of bounding boxes and binary
masks for each individually detected item in the scene. To train the Mask
R-CNN, we manually labeled 371 images (also used as a comparison data set for
the optical flow-based segmentation network), which were split 80%/10%/10%
between training/validation/testing. We labeled 5 classes of foreground
objects: leaders, side branches, spurs, an “other” branch category used for
tree branches that either extended off the side of the image or did not belong
in any of the aforementioned categories, and non-branch objects (primarily
wires, wooden posts, and ribbons). An example of a labeled image is shown in
Figure 6. For the rest of the paper, we only use the side branch and leader
detection classes.

To enable generalization of the Mask R-CNN to multiple environments, we first
process all RGB images through the segmentation network (Sec V-B1) to produce
a single channel mask corresponding to the branches. The Mask R-CNN network is
then trained using the segmentation masks as the input. Using the masks as the
network input ensures that the network focuses primarily on the shapes of the
branches rather than overfitting to the specific color profile of the training
data.

####  V-B3 Producing pixel and cut position estimates

Figure 7: The process of matching a detected side branch with a leader. Each
detection is represented as a line segment. If a side branch intersects the
leader line segment and the mask is sufficiently close to the leader, the
pruning point is computed a fixed offset away from the estimated join point
between the side branch and leader.

Once the side branches and leader branches are detected, the next step is to
match each branch detection to a leader (if possible) and determine the
location of intersection. The method is illustrated in Figure 7. First, all of
the detected masks are decomposed using PCA to yield a primary orientation and
center. Each leader branch is assigned a width $w$ equal to the average number
of pixels in the horizontal direction along the mask. For each side branch-
leader pair, we check to see if their point of intersection $p^{*}$ lies
inside of the leader and if any part of the side branch mask is sufficiently
close to the leader boundary (at width $w$). If so, letting
$\overrightarrow{b}$ represent the unit vector for the side branch (facing
away from the trunk), we compute the pixel pruning point as
$p^{*}+\left(\frac{w}{2}+m\right)\overrightarrow{b}$, where $m=90$ is a
manually specified pixel offset from the join point between the leader and the
side branch. We repeat this process for every side branch-leader pair.

To convert the pixel estimate into a 3D location, we make an assumption that
the pixel is located on a plane 30cm away from the camera’s optical frame in
the z-direction. We then use the intrinsics of the camera to deproject the
point onto the plane, yielding a 3D estimate of the point in the camera’s
optical frame. We then use our kinematic model of the arm with the camera
mounting to convert the camera frame point into a world frame estimate.

Note that the estimate of the pruning point in the world is not particularly
precise, since the 30cm planar estimates for the pruning points will not
always be true and the 90 pixel offset is chosen arbitrarily. Section V-D
discusses the controller we use during the approach phase to correct for this
estimate error.

###  V-C Moving to the approach position

Once we convert the pixel estimates for the pruning points into a 3D target,
the next step is to determine the approach pose for the robot arm. To do so,
we maintain the orientation of the cutter associated with the current joint
waypoint and compute the position for the end-effector such that the pruning
point’s position estimate would coincide with a position of $[0,0,0.30]$ in
the end effector’s frame. We then use the RRT-Connect motion planner [18] to
move the robot to this pose.

###  V-D Closed-loop approach (waypoint to cut point)

Once the robot moves to the approach position, the final step in the pruning
process is to move the cutters towards the target branch and execute the cut.
At this point, we make an assumption that the initial estimate of the pruning
target is good enough so that, when the arm is moved to the approach pose, the
leader and side branch are both visible. We then execute a hybrid controller
that uses visual and force feedback to guide the cutter to the branch.

The details of the hybrid controller are explained in our previous work [25],
with minor changes to parameters. The visual controller is a deep neural
network that takes in a segmented version of the scene and outputs a control
action $(v_{x},v_{y})\in[-1,1]\times[-1,1]$. Given a forward velocity of
$s=0.03$, the end effector is commanded to move at a Cartesian velocity of
$[sv_{x},sv_{y},s]$ in the end effector’s frame. We chose to run the visual
controller at 1 frame per second in order to obtain reasonable optical flow
estimates in between successive frames before updating the control velocity.
This controller was trained in a simulated PyBullet [26] environment by
formulating a pruning episode as a Markov Decision Process and training it
using the Proximal Policy Optimization (PPO) algorithm [27]. By utilizing the
segmentation network as a means of normalizing synthetic and real images, the
controller is able to transfer to a real robot with no adjustments necessary.
Once a force exceeding 1.5N is detected by the force-torque sensor on the
robot’s wrist, we switch over to an admittance controller that regulates the
control velocities to guide the branch inside the cutters while minimizing
forces on the environment. Once the admittance controller terminates, we
execute the cut using the electric cutters.

The segmentation scheme we use is the same one as described in Section V-B1,
in which a mask is produced for the cutter and the branch in the scene using
optical flow computed from successive RGB frames. We make two changes from our
previous work for the control framework. First, for the network which outputs
the control action, we choose to append the 3-channel optical flow to the
2-channel mask, resulting in a 5-channel input. We chose this setup due to the
segmentation network sometimes leaving holes in the segmentation, especially
with simulated data. The optical flow data was typically more reliable in
showing the shape of the object in front and so provided a fallback for the
controller in case the segmentation quality was poor. Second, because the
cutter stays fixed in the frame of the view of the camera, we choose to
replace the predicted cutter segmentation with a ground truth mask for the
cutter. This ground truth was automatically computed by PyBullet for the
simulated environment and was provided by a manually labeled mask for the real
environment. We set the system up this way because an accurate representation
of the cutter’s location is essential for accurate pruning.

We also made a change to the reward function $\mathcal{R}$ used to train the
RL system. Previously, an episode was set up so that upon success (i.e. the
target branch entering a success region inside of the cutter mouth), the agent
would receive a large reward, and upon failure (i.e. time running out or the
branch entering a failure region outside of the cutters), the agent would
receive a large penalty. Otherwise, the agent would receive an intermediate
reward between 0 and $\delta$ (the timestep of the simulation) corresponding
to the cutter’s proximity to the target branch. One issue we sometimes
observed was that the system would move the arm such that the camera lost
sight of the desired target, which would cause the rest of the control to fail
since we would not expect the system to guide itself to a target that it
cannot see. We believe the source of this behavior was the the proximity-based
intermediate reward; when the cutter is far away from the branch, no matter
what action it chooses, the intermediate reward will be similar in magnitude.
The behavior that we actually want is for the robot to immediately line up the
visible blade of the cutter on top of the target branch. As long as the robot
maintains the alignment with the blade and the branch, as the cutter moves
forward, the branch should hit the inside of the cutter blade, leading to a
success.

Figure 8: The intermediate reward for the agent is determined by the proximity
of the cutter’s ”hit point” and the episode target in the image space,
encouraging the agent to align the cutters with the branch quickly.
Furthermore, the episode counts as a failure if the episode target leaves the
image during the execution.

To encourage this behavior, we define a new intermediate reward function based
on the proximity of the target and the “hit point” of the blade in the image
space rather than in 3D space. The basic setup is shown in Figure 8. First, we
define the hit point of the blade to be at the position $[0,0.025,0.04]$ in
the tool frame. At each step of the simulation, we project the 3D locations of
the cutting target and the blade hit point into the image plane to obtain
normalized image coordinates $p_{target}$ and $p_{hit}$ (i.e. locations inside
the image are represented as a value in $[0,1]$). If $p_{target}$ falls
outside of the image bounds, the episode instantly counts as a failure and the
corresponding penalty is applied. Otherwise, the intermediate reward is based
on the distance between $p_{target}$ and $p_{hit}$, as well as a manually
chosen threshold $d_{thres}=0.5$ and the simulation timestep $\delta$:

$\mathcal{R}_{s_{t+1}}=\delta\max\left(0,1-\frac{\|p_{target}-p_{hit}\|}{d_{thres}}\right)$
(1)

Changing the reward function like this encourages the system to align the
cutters with the branch as quickly as possible. Combined with the additional
failure criterion of the target branch leaving the image, we were able to
achieve more robust and consistent performance out of the approach phase.

##  VI System Evaluation

We evaluated our system at a UFO sweet cherry orchard in Prosser, WA on an
overcast day on March 17, 2022. As it was late in the dormant season, these
cherry trees had already been partially pruned by workers. Despite this, we
identified 10 locations in the orchard which had a suitable number of eligible
branches for pruning. For a location to be eligible, there had to be at least
2 leaders located within the scanning range of the linear axis, each with at
least one candidate branch for pruning. To avoid collisions, we manually pre-
pruned any branches sticking out from the trellis wall.

After resetting the linear axis to the first joint waypoint (i.e. linear axis
set to the zero position), a human operator drove the vehicle so that the end-
effector was placed at an appropriate distance from the trellis wall (about
20-30 cm) and the first leader was centered in the view of the camera. Once
the vehicle was positioned we executed our 28-waypoint scanning procedure.

Our system was designed to involve minimal human intervention and
theoretically be operable without human intervention. For this trial, we chose
to manually control and monitor the system during execution for any safety-
critical issues. Our three manual interventions were:

  * •

Driving the vehicle: Currently, the vehicle is driven by a human operator and
not autonomously. This is important because positioning the vehicle an ideal
distance from the trellis wall is nontrivial due to the necessity to avoid
arm-tree collisions as the vehicle is moving, as well as the difficulty
involved in stopping the differential drive vehicle an ideal distance away
from the wall. If the vehicle is too close, the arm may not have enough room
to maneuver, while if the vehicle is too far, the arm may not be able to reach
the desired target.

  * •

False positive pruning point detections: When the detection algorithm
identified small fruiting spurs (removing these would decrease the grower’s
yields) we did not execute the cuts. No corrections were made for false
negative detections, i.e. if the pruning point system failed to detect an
eligible branch for pruning.

  * •

Approach execution monitoring: In the event that the cutters missed the target
branch or were about to collide with the environment during the approach, we
manually terminated the approach and rewound the robot back to the start of
the approach. For each pruning target, we allowed 3 attempts to successfully
cut the target before moving on to the next target.

##  VII Results and discussion

###  VII-A Detection and cutting accuracy

In total, we detected 38 branches that were long enough to cut. Out of these
38 branches, the robot was ultimately able to cut 22 of them, representing a
58% cutting success rate. The breakdown of the causes of failure is as
follows:

  * •

Six failures were due to a motion planning failure to the approach position.
If the produced motion plan had a sum of all joint displacements above a given
threshold (in our case $\pi$ radians), likely indicating a poor quality motion
plan, we also counted the plan as a failure.

  * •

Of the remaining 32 branches, 10 of the attempts failed due to exhausting the
3 attempt limit to reach the target, representing a 69% success rate in
ultimately reaching the branch.

  * •

Of the remaining 22 branches, the average number of attempts it took to reach
the target was 1.4.

Various factors accounted for the robot missing the target. In some
situations, the initial estimate obtained using an assumption of a distance of
30 cm was sufficiently inaccurate that the cutting target would be barely
visible or out of sight from the approach position. Other than that, most
misses were caused by the end-effector passing underneath the target branch;
we observed that our RL-trained controller sometimes failed to move the end-
effector up at critical moments.

Regarding the accuracy of the branch detection, as previously noted, we had 38
true positive detections of pruning points. By far the biggest issue we had
with the system was the presence of false positives. In total, we had 115
false positives reported. Ninety-six of these were simply spurs being detected
as side branches. We attribute this to our views in the training data being
further away from the trellis wall than during our trials; since the camera
was closer up during the trials, the spurs appeared to be of sufficient length
in the images to be classified as side branches. In practice, this issue could
be addressed by using depth data to measure the length of each detection and
using a length-based cutoff to filter out detected spurs. Ten of the false
positives were due to horizontal trellis wires being detected as side
branches, indicating a need to more robustly model the environment. The
remaining 9 false positives were mainly due to false detections of non-
existent leaders leading to a spurious intersection.

We also had 27 instances of false negatives in which an intersection of a side
branch and a leader was not detected. Two of them were due to a leader not
being detected. For all other 25 instances though, both the leader and the
side branch were properly detected, and so the lack of intersection was due to
implementation issues in our intersection algorithm, which we will address for
subsequent trials.

###  VII-B Runtimes

Figure 9: Left: Average time spent in the different stages of the scanning
procedure, not including operations on detected pruning points since the
number of cuts and cutting attempts varied per tree (total 284s average).
Right: Average time spent at each stage for a single cutting attempt assuming
the approach succeeds on the first try (total 35.1s average).

Figure 9 shows the breakdown of the system’s cycle time. Since the number of
cuts executed is variable across experiments, we choose to analyze the
runtimes of the scanning process and of a single cutting attempt separately.

Overall, an entire scan of a region spanning 0.6m horizontally and 0.6m
vertically took 284s. The majority of the time (115s) was actually spent
moving the camera at each waypoint (to obtain alternate views). This was
because we had to move the robot arm slowly to prevent the arm from vibrating
when the arm reached its goal, which we found often led to poor optical flow
estimates. However, there was also some redundant movement because the robot
would first move to the scan waypoint, then to the offset view, and then back
to the scan waypoint (rather than continuing to the next scan waypoint). By
eliminating this redundancy, we could cut down on the time spent moving the
camera by half.

The other notably slow part of the scanning procedure was moving the linear
axis, which took about 23s to move 20 cm, resulting in an additional 69s to
the scanning procedure. The slow movement speed was chosen partially due to
safety concerns, but is also limited somewhat by the screw-based design of the
system. Future iterations of our work will focus on increasing the design’s
travel speed. The remaining sources of time are from moving the arm between
waypoints (50s) and running the detection algorithms (49s), which are not
notably inefficient, though the speed of FlowNet2 and Mask R-CNN could be
improved by using a more modern graphics card.

For the cutting process, assuming success on the first try, an average cut
took 35.1 seconds, consisting of 1.7s to move the arm to the approach
position, 24.8s to execute the approach, 1.0s to execute the cut, and 7.6s to
retract the arm back to the starting position. The main constraint to the
approach was the 3 cm/s limit on the forward velocity of the end-effector,
which we imposed for safety and monitoring purposes. One main contributor to
the approach time was waiting for the admittance controller to terminate, as
in some instances the desired balance of forces never occurred, leading us to
wait for the 15s timeout on that part of the controller. Increasing the
velocity of the approach would also be possible. However, moving the arm
faster can lead to noisy force-torque estimates that may accidentally trigger
the transition to the admittance controller, which is something we
occasionally saw even with the 3cm/s cutoff. Additional work is required for
developing a more robust criterion for switching to, and terminating, the
admittance controller.

##  VIII Conclusion

In this paper, we present an end-to-end system for autonomously pruning sweet
cherry trees in a modern, planar architecture. First, we use a novel
segmentation method to reliably extract the foreground branches of the scene,
avoiding the need to control the lighting of the environment. Using the
foreground masks, we then use a Mask R-CNN network to detect pruning points.
Finally, after projecting the detected pixel locations into 3D space and
moving the robot to an approach position in front of the target, we utilize a
closed-loop hybrid vision/interaction controller to accurately guide the
cutters to the branch, allowing us to compensate for many sources of error in
the original point cloud estimate while regulating interaction with the
environment. Though the accuracy and cycle time of the system can still be
improved, our field trials in a realistic outdoor environment demonstrate that
our pipeline is a viable one for use in a real orchard.

In addition to improving the performance of the individual subcomponents of
our system, one major system aspect we would like to investigate in the future
is the design of the manipulator. We observed that the UR5e’s revolute joints
were not suitable for use in a compact orchard space. If the robot was too
close to the trellis wall, it had a difficult time avoiding collisions with
the wall, while if it was too far away, the arm would fail to reach the target
points. Our goal will be to explore other manipulator designs with kinematics
that are better posed for modern orchard systems.

## References

  * [1] R. Verbiest, K. Ruysen, T. Vanwalleghem, E. Demeester, and K. Kellens, “Automation and robotics in the cultivation of pome fruit: Where do we stand today?” _Journal of Field Robotics_ , vol. 38, no. 4, pp. 513–531, 2021\.
  * [2] L. Calvin and P. Martin, “The US produce industry and labor: Facing the future in a global economy,” Tech. Rep., 2010.
  * [3] C. W. Bac, E. J. van Henten, J. Hemming, and Y. Edan, “Harvesting robots for high-value crops: State-of-the-art review and challenges ahead,” _Journal of Field Robotics_ , vol. 31, no. 6, pp. 888–911, 2014.
  * [4] B. Ma, J. Du, L. Wang, H. Jiang, and M. Zhou, “Automatic branch detection of jujube trees based on 3d reconstruction for dormant pruning using the deep learning-based method,” _Computers and Electronics in Agriculture_ , vol. 190, p. 106484, 2021.
  * [5] A. Zahid, M. S. Mahmud, L. He, D. Choi, P. Heinemann, and J. Schupp, “Development of an integrated 3r end-effector with a cartesian manipulator for pruning apple trees,” _Computers and Electronics in Agriculture_ , vol. 179, p. 105837, 2020.
  * [6] B. Zhang, X. Chen, H. Zhang, C. Shen, and W. Fu, “Design and performance test of a jujube pruning manipulator,” _Agriculture_ , vol. 12, no. 4, p. 552, 2022.
  * [7] A. Zahid, L. He, D. D. Choi, J. Schupp, and P. Heinemann, “Collision free path planning of a robotic manipulator for pruning apple trees,” in _2020 ASABE Annual International Virtual Meeting_. American Society of Agricultural and Biological Engineers, 2020, p. 1.
  * [8] F. Yandun, T. Parhar, A. Silwal, D. Clifford, Z. Yuan, G. Levine, S. Yaroshenko, and G. Kantor, “Reaching pruning locations in a vine using a deep reinforcement learning policy,” in _IEEE International Conference on Robotics and Automation (ICRA)_. IEEE, 2021, pp. 2400–2406.
  * [9] T. Botterill, S. Paulin, R. Green, S. Williams, J. Lin, V. Saxton, S. Mills, X. Chen, and S. Corbett-Davies, “A robot system for pruning grape vines,” _Journal of Field Robotics_ , vol. 34, no. 6, pp. 1100–1122, 2017.
  * [10] V. Robotics Corporation. (2017) Vision robotics corporation. [Online]. Available: https://www.visionrobotics.com/
  * [11] A. Silwal, F. Yandun, A. Nellithimaru, T. Bates, and G. Kantor, “Bumblebee: A path towards fully autonomous robotic vine pruning,” _arXiv preprint arXiv:2112.00291_ , 2021.
  * [12] N. Strisciuglio, R. Tylecek, M. Blaich, N. Petkov, P. Biber, J. Hemming, E. van Henten, T. Sattler, M. Pollefeys, T. Gevers _et al._ , “Trimbot2020: an outdoor robot for automatic gardening,” in _ISR 2018; 50th International Symposium on Robotics_. VDE, 2018, pp. 1–6.
  * [13] A. Silwal, T. Parhar, F. Yandun, H. Baweja, and G. Kantor, “A robust illumination-invariant camera system for agricultural applications,” in _2021 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)_. IEEE, 2021, pp. 3292–3298.
  * [14] A. Gongal, A. Silwal, S. Amatya, M. Karkee, Q. Zhang, and K. Lewis, “Apple crop-load estimation with over-the-row machine vision system,” _Computers and Electronics in Agriculture_ , vol. 120, pp. 26–35, 2016.
  * [15] M. Whiting, “Precision orchard systems,” _Automation in tree fruit production: Principles and practice_ , pp. 75–93, 2018.
  * [16] L. E. Long, G. A. Lang, M. D. Whiting, and S. Musacchi, “Cherry training systems,” pp. 50–56, 2015.
  * [17] A. You, C. Grimm, A. Silwal, and J. R. Davidson, “Semantics-guided skeletonization of upright fruiting offshoot trees for robotic pruning,” _Computers and Electronics in Agriculture_ , vol. 192, p. 106622, 2022.
  * [18] J. J. Kuffner and S. M. LaValle, “Rrt-connect: An efficient approach to single-query path planning,” in _IEEE International Conference on Robotics and Automation (ICRA)_ , vol. 2. IEEE, 2000, pp. 995–1001.
  * [19] I. A. Sucan, M. Moll, and L. E. Kavraki, “The open motion planning library,” _IEEE Robotics & Automation Magazine_, vol. 19, no. 4, pp. 72–82, 2012\.
  * [20] A. You, C. Grimm, and J. R. Davidson, “Optical flow-based branch segmentation for complex orchard environments,” _arXiv preprint arXiv:2202.13050_ , 2022\.
  * [21] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros, “Image-to-image translation with conditional adversarial networks,” in _IEEE Conference on Computer Vision and Pattern Recognition_ , 2017, pp. 1125–1134.
  * [22] J. Cheng, Y.-H. Tsai, S. Wang, and M.-H. Yang, “Segflow: Joint learning for video object segmentation and optical flow,” in _IEEE International Conference on Computer Vision_ , 2017, pp. 686–695.
  * [23] K. He, G. Gkioxari, P. Dollár, and R. Girshick, “Mask r-cnn,” in _IEEE International Conference on Computer Vision_ , 2017, pp. 2961–2969.
  * [24] Y. Wu, A. Kirillov, F. Massa, W.-Y. Lo, and R. Girshick, “Detectron2,” https://github.com/facebookresearch/detectron2, 2019.
  * [25] A. You, H. Kolano, N. Parayil, C. Grimm, and J. R. Davidson, “Precision fruit tree pruning using a learned hybrid vision/interaction controller,” in _IEEE International Conference on Robotics and Automation (ICRA)_ , 2022, pp. 2280–2286.
  * [26] E. Coumans and Y. Bai, “Pybullet, a python module for physics simulation for games, robotics and machine learning,” 2016.
  * [27] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, “Proximal policy optimization algorithms,” _arXiv preprint arXiv:1707.06347_ , 2017\.