\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{8.9in}

\newcommand{\seqnum}[1]{\href{http://www.research.att.com/cgi-bin/access.cgi/as/~njas/sequences/eisA.cgi?Anum=#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\begin{center}
\vskip 1cm{\LARGE\bf Variations on Euclid's Formula for \\
\vskip .1in
Perfect Numbers
}
\vskip 1cm
\large
Farideh Firoozbakht\\
Faculty of Mathematics \& Computer Science\\
University of Isfahan\\
Khansar\\
Iran\\
\href{mailto:f.firoozbakht@sci.ui.ac.ir}{\tt f.firoozbakht@sci.ui.ac.ir}\\
\ \\
Maximilian F. Hasler\\
Laboratoire CEREGMIA \\
Univ. Antilles-Guyane\\
Schoelcher \\
Martinique\\
\href{mailto:mhasler@univ-ag.fr}{\tt mhasler@univ-ag.fr} \\
\end{center}

\vskip .2 in

\begin{abstract}
We study several families of solutions to equations of the form $\sigma(n)=A\,n+B(n)$, 
where $B$ is a function that may depend on properties of $n$.
\end{abstract}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{thm}[theorem]{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{con}[theorem]{Conjecture}
\newtheorem{defin}[theorem]{Definition}
\newenvironment{definition}{\begin{defin}\normalfont\quad}{\end{defin}}
\newtheorem{examp}[theorem]{Example}
\newenvironment{example}{\begin{examp}\normalfont\quad}{\end{examp}}
\newenvironment{ex}{\begin{examp}\normalfont\quad}{\end{examp}}
\newtheorem{rema}[theorem]{Remark}
\newenvironment{remark}{\begin{rema}\normalfont\quad}{\end{rema}}
\newenvironment{rem}{\begin{rema}\normalfont\quad}{\end{rema}}

% These automatically add proper labels and make the text more human readable
\def\Theorem#1 #2\par{\begin{thm}\label{thm#1}#2\end{thm}}
\def\Proposition#1 #2\par{\begin{prop}\label{prop#1}#2\end{prop}}
\def\Corollary#1 #2\par{\begin{cor}\label{cor#1}#2\end{cor}}
\def\Conjecture#1 #2\par{\begin{con}\label{cor#1}#2\end{con}}
\def\Example#1 #2\par{\begin{ex}\label{ex#1}#2\end{ex}}
\def\Remark#1 #2\par{\begin{rem}\label{rem#1}#2\end{rem}}
\def\Proof#1\par{\begin{proof}#1\end{proof}}%%%%% with amsthm, for JIS %%%%%
%\def\Proof#1\par{\vspace{-\baselineskip}\paragraph {Proof.}#1\hskip0pt\mbox{}\hfill$\Box$}
\def\N{\mathbb N}
\def\Z{\mathbb Z}
\def\eg{{e.g.}}
\def\ie{{i.e.}}
\def\ndiv{\mathrel{\not|\,}}
\def\sol{x}% preferred name of solution (was: n)



\section{Introduction} 
We recall that {\em perfect numbers\/} (sequence \seqnum{A000396} of
Sloane's {\it Encyclopedia} \cite{OEIS})
are defined as solutions to the equation $\sigma(x) = 2\,x$,
where $ \sigma(x) $ denotes the sum of all positive divisors of $ x $, 
including 1 and $ x $ itself.
Euclid showed around 300 {\sc BCE} \cite[Proposition IX.36]{Euclid}
that all numbers of the form $ \sol = 2^{q-1} M_q $,  
where  $M_q = 2^q-1$ is prime (\seqnum{A000668}), are perfect numbers.

While it is still not known whether there exist any odd perfect numbers,
Euler \cite{EulerPerfect} proved a converse of Euclid's proposition,
showing that there are no other {\it even\/} perfect numbers
(cf.\ \seqnum{A000043},
\seqnum{A006516}).
(As a side note, this can also be stated by saying that the even perfect numbers are exactly 
the triangular numbers (\seqnum{A000217}$(n)=n(n+1)/2$) 
whose indices are Mersenne primes \seqnum{A000668}.)

One possible generalization of perfect numbers
is the multiply or $k$--fold perfect numbers 
(\seqnum{A007691}, \seqnum{A007539}) such that $\,\sigma(x) = k\,x\,$~\cite{dickson,%beiler,
roberts,stew,wells}.
Here we consider some modified equations, where a second term is added on the right hand side.
The starting point for these investigations was the following observation, 
which to the best knowledge of the authors has not been discussed earlier in the literature:



\subsection{The equation $\sigma(x)=2\,(x+m)$}

%\noindent{\bf Notation. } 
Here and throughout this paper, letters $k,\ell,m,...,x$ will always denote integers.


\Theorem 1 %{\rm[Firoozbakht]}
%If $n=2^{k-1}p$ where $p = 2^k-1-2\,m$ is an odd prime, then $\sigma(n)=2(n+m)$.
If\/ \,$ p=2^k - 1 - 2\,m $\, is an odd prime, 
then $ \sol=2^{k-1}\,p $ is a solution to $\sigma(x)=2\,(x+m)$.


\Proof
This result is an immediate consequence of the formula
\begin{equation}\label{eq1}
   \sigma(2^{k-1}\,p) = (2^k - 1)\,(p+1) ~,
\end{equation}
and the relation $2^k-(p+1) = 2\,m$.

Actually, this relation could be seen as the definition of $ m $
(which may take any positive, zero or negative value), 
as function of the prime $ p $ and  $ k\in\mathbb N $, 
which could both be chosen completely arbitrarily.
However, in the spirit of this paper, 
we would rather consider the value of $m$ to be given,
and vary $k$ to see when we get a prime $p$ and thus a solution to the given equation.

\Example 1'
As function of $m$, we get the following minimal solution to $\sigma(x)=2(x+m)$:
~(For positive $m$ these $k$--values are listed in \seqnum{A096502}.)
$$
% for(m=-5,5, for(k=1,1e5, ispseudoprime(2^k-1-2*m) | next; print([m,k,p=2^k-1-2*m,2^(k-1)*p]); break))
\begin{array}{*{12}{c|}}
m & -5 & -4 & -3 & -2 & -1 & 0 & 1 & 2 & 3 & 4 & 5\\\hline
k & 1 & 2 & 1 & 1 & 1 & 2 & 3 & 3 & 39 & 4 & 4\\\hline
p & 11 & 11 & 7 & 5 & 3 & 3 & 5 & 3 & 549755813881 & 7 & 5\\\hline
x & 11 & 22 & 7 & 5 & 3 & 6 & 20 & 12 & 2^{38}p\approx 1.5e24& 56 & 40\\\hline
\end{array}
$$



In spite of %being a very simple observation
the simplicity of this theorem and its proof, we think that %However, 
this way of writing the formula provides a nice generalization of 
the well-known formula for the even perfect numbers, 
which are obtained as the special case $m=0$.
In some sense, it shows how the ``deviation'' ($2\,m$) of $p$ from a Mersenne prime $M_k=2^k-1$, 
modifies the corresponding value of $\sigma(\sol)$.
In the sequel, we attempt a systematic presentation of a certain number of similar cases.

%	On the other hand, we also have the following

\Theorem 1'
If\/ \,$ m $\, is a perfect number (\seqnum{A000396}), then the equation $ \sigma(x) = 2\,(x+m) $
has infinitely many solutions, including all numbers of the form $ \sol= m\,p $, 
where $ p $ is a prime not dividing $ m $.

\Proof
%This is again checked immediately, using multiplicativity of $ \sigma $. 
%The immediate verification, using multiplicativity of $ \sigma $, 
The simple calculation is developed for %in the proof of 
Theorem~\ref{thm1''} below.

\Remark 1'
Numbers which are solutions to $ \sigma(x) = 2\,(x+m) $, with $ m $ being a proper divisor of $ x $,
are called admirable numbers (\seqnum{A111592}). In the particular case where they are of the form
$x=m\,p$ with $p<m$, the ``subtracted divisor'' $m$ is larger than $\sqrt x$, so they are in \seqnum{A109321}.


Although Theorem~\ref{thm1'} gives solutions to the same equation as Theorem~\ref{thm1} (if $m$ is the same), 
the spirit is quite different: While $m$ could take any value in Theorem~\ref{thm1}, 
we have here an infinite sequence of solutions for each of the 47 known perfect numbers, 
and this sequence is different (even disjoint) from the set of solutions to the same equation 
which follows from Theorem~\ref{thm1}:

\Example 01
If we choose the perfect number \,$ m=6 $\,, 
the respective theorems provide the following solutions to the equation \,$ \sigma(x) = 2\,x+12 $\,:
%\def\item{\\-- }
\begin{itemize}
\item	Theorem~\ref{thm1}: $\, \sol=$ {\rm 24, 304, 127744, 33501184, ...}
(= \seqnum{A096821}), 
	by scanning 
%\phantom{--}
$k$--\kern0ptvalues to see whether\linebreak[3] $2^k-13$ is prime, 
	\ie, whether $k\in$ \seqnum{A096818}.
\item	Theorem~\ref{thm1'}: $\,\sol=$ {\rm 30,\ 42,\ 66,\ 78,\ 102,\ 114, ...},
	\ie, $\,6\,p\,$ for all primes \,$ p > 3 $.
%138,174,186,222,246,258,282,
\end{itemize}
%\\
The solution $x=54=2\cdot 3^3$, in neither of these lists, 
is covered by the following Proposition~\ref{prop1a}.
%discussed in Remark~\ref{rem01}.% below.
%\\%[1ex]
%
% for(k=1,99,ispseudoprime(2^k- 57 )&print1(2^(k-1)*(2^k- 57 ),","))
%
For  \,$ m=28 $\,, we get the following solutions to \,$ \sigma(x) = 2\,x+56 $\,:
\begin{itemize}
\item
{}From Theorem~\ref{thm1}, we have $\,\sol =$ {\rm 224, 4544, 25472, 495104,...}, %2145615872,137424011264,8795973484544,36028789368553472
by searching for $k>\log_2(57)$ such that $p = 2^k-57$ is prime.
%%% CHANGED x => p in last eqn -MFH,11.1.10
\item
From Theorem~\ref{thm1'}, we have $\,\sol=$ {\rm 84, 140, 308, 364, 476, 532, 644, 812,...},
\ie, $\,\sol=28\,p\,$ for all odd primes \,$ p \ne 7 $.
\end{itemize}
%\\
Again, there are solutions $x=$ {\rm 1372, 9272, 14552, ...} 
% 1372 = 2^2 7^3 => Theorem 1.10 (as of Nov'09),
% 9272=2^3*19*61, 2^3*17*107
which are not in these two lists, %obtained from either of the Theorems, 
but discussed below. 
%(See Proposition~\ref{prop1a} for $x= 1372 = 2^2\cdot7^3$,
%
%{m=6; for(i=1,1e7,sigma(i)-(i+m)*2 & next; i%m==0 & (( gcd(m,i\m)==1 & isprime(i\m) /*Thm 1.2*/) |
% ( isprime(p=gcd(m,i\m)) && i==m*p^2 )) & next; isprime(i>>valuation(i,2)) & next/*Thm 1.1*/;  print1(i","))}
%
% { m=6;for(z=0,50,print1([z*10/5]);for(i=1+z*10^7/5,(z+1)*10^7/5,sigma(i)-(i+m)*2&next;
% i%m==0&((gcd(m,i\m)==1&isprime(i\m))|(isprime(p=gcd(m,i\m))&&i==m*p^2))&next;isprime(i>>valuation(i,2))&next;print1(i",")))
%
\\%[1ex]
%
For \,$m = 496$\,, we get %the %above theorems give 
the following solutions to \,$ \sigma(x) = 2\,x+992 $\,:
\begin{itemize}
\item
From Theorem~\ref{thm1}, we get $\,\sol=$ {\rm 15872, 126083072, 8524857344, ...}, % 2251766494134272, 144114921519448064
by searching $k>\log_2(993)$ such that $p=2^k-993 $ is prime.
\item
From Theorem~\ref{thm1'}, we have $\,\sol=$ {\rm 1488, 2480, 3472, 5456, 6448, 8432, 9424, 11408, 14384, 18352, ...},
\ie, $\,\sol=496\,p\,$ for all odd primes \,$ p \ne 31 $.
\end{itemize}
%\\
Solutions to this equation not obtained from Theorem~\ref{thm1} or~\ref{thm1'} include
%\def7{\cdot}
\,$x = 2892 = 2^2\cdot 3 \cdot 241$\, and \,$\sol = 6104 = 2^3\cdot 7 \cdot 109$,
% see below.
%section~\ref{x=plq}.
they result from Proposition~\ref{propdec20}, see Example~\ref{exdec20}.

\if0%%%%%%%%% for m = 496 = 2^4*31: x = 2892 = 2^2 7 3 7 241 and x = 6104 = 2^3 7 7 7 109

%%% OBSERVE that 241 - 1 = 2^4 * 3 * 5 ; 109 = 2^2 * 3^3
%%% note that 3*5 = (2^2-1)(2^2+1) ; 3^3 = (2^2-1)(2^3+1)

if  N = 2^p Mp Q

sigma(N) - 2 N
	= ( 2^(p+1)-1 ) (Mp+1) (Q+1) - 2^(p+1) Mp Q
	= ( 2^(p+1) ) (Mp+Q+1) -  (Mp+1) (Q+1)
	= 2^(p+1) Mp + 2^(p+1) Q + 2^(p+1) - (Mp+1) Q - (Mp+1)
	= 2^(p+1) Mp + (Mp+1) Q + (Mp+1)
	= ( 2 Mp + Q + 1 ) (Mp+1)
	= ( 2(Mp+1) + Q - 1 ) 2^p




\fi


For each perfect number $m$, there is a particular solution %s mentioned above, 
not covered by the preceding theorems: %, are given as follows:


\Proposition 1a
%If $p=2^k-1$ is a Mersenne prime and $m = 2^{k-1} p$ is the associated perfect number,
If $m = 2^{k-1}\, p$ is the perfect number associated to the %Mersenne 
prime $p=2^k-1$, then $ x = m\,p^2 = 2^{k-1} p^3 $ is a solution to $ \sigma(x)=2\,(x+m) $.

\Proof
For $ x = 2^{k-1} p^3 $ we have $ \sigma(x)-2(x+m)=(2^k-1)(p^4-1)/(p-1)-2^k(p^3+p) = p(p^2+1)(p+1)-(p+1)(p^3+p) = 0$.


\Example 1a
For $m=6,~28$ and $496$, we get, respectively, 
the solutions $x=54=2\cdot3^3,~1372=2^2\cdot7^3$ and $476656=2^4\cdot31^3$ to $\sigma(x)=2(x+m)$.

\Remark 01
With this result, we cover all solutions to $\sigma(x)=2(x+6)$ (at least up to $10^{10}$), 
while the equations $ \sigma(x) = 2\,(x+28) $ and $ \sigma(x) = 2\,(x+496) $ 
%(and likewise for larger perfect numbers)
have several other solutions with more prime divisors, which we did not consider so far.
%m=28: 9272, 14552, 74992, 6019264, 15317696, 35019968, 53032832,[54]...[100]
Some of them are consequence of the following result:


\Proposition dec20
% If $m=2^p\,(M_p+\frac{Q+1}2)$, where $M_p=2^p-1$ and $Q$ are two distinct odd primes,
% then a solution to $\sigma(x)=2\,(x+m)$ is given by $x=2^p\,M_p\,Q$.
% CHANGED p TO k FOR HOMOGENITY WITH PRECEDING THMS & PROP.1.6  ETC.
If $m=2^k\,(M_k+\frac{Q+1}2)$, where $M_k=2^k-1$ and $Q$ are two distinct odd primes,
then a solution to $\sigma(x)=2\,(x+m)$ is given by $x=2^k\,M_k\,Q$.


%\Proof As before, we have $\sigma(2^p\,M_p\,Q)-2\cdot2^p\,M_p\,Q=2^{p+1}(M_p+(Q+1)/2)$.
\Proof  As before, we have $\sigma(2^k\,M_k\,Q)-2\cdot2^k\,M_k\,Q=2^{k+1}(M_k+(Q+1)/2)$.


\Example dec20
We have $m = 496 = 2^2\,(3+(241+1)/2) = 2^3\,(7+(109+1)/2)$,
which leads to the two solutions $ \sol = 2^2\cdot3\cdot241 = 2892 $ 
and $ \sol = 2^3\cdot7\cdot109 = 6104 $.

The above proposition is a particular case of

\Theorem dec23
If $ m = 2^{k} (2^{k+1} - 1) - 2\, \ell_1\,\ell_2 $
such that $ p_i = 2^{k+1} - 1 + 2\, \ell_i $ ($i=1,2$) are two distinct odd primes, 
% VERSION WITH k-1
%% If $ m = 2^{k-1} (2^{k} - 1) - 2\, \ell_1\,\ell_2 $ %($k,\ell_1,\ell_2\in\N$)
%% such that $ p_i = 2^{k} - 1 + 2\, \ell_i $ ($i=1,2$) are two distinct (odd) primes, 
%If numbers p1 = 2^(n+1) - 1 + 2k & p2 = 2^(n+1) - 1 + (2^n (2^(n+1) - 1) - m) / k
then $ \sol = 2^{k}\,p_1\,p_2 $ is a solution of the equation $ \sigma(x) = 2\,(x + m)$.


\Example dec23
For $ m = 496 $, we have (among others) the following solutions:
$$
\begin{array}{*5{c|}}
 k &\ell_1&p_1& p_2  &     x    \\\hline %  k 
 2 & -2 &   3 & 241  &    2892  \\\hline %  3 
 3 & -4 &   7 & 109  &    6104  \\\hline %  4 
 5 & 20 & 103 & 139  &   458144 \\\hline %  6 
 5 &  5 &  73 & 367  &   857312 \\\hline %  6 
 5 &  4 &  71 & 443  &  1006496 \\\hline %  6 
 5 &  2 &  67 & 823  &  1764512 \\\hline %  6 
 6 &  6 & 139 & 1399 & 12445504 \\\hline %  7 
 6 &  2 & 131 & 3943 & 33058112 \\\hline %  7 
 7 & 82 & 419 & 647  & 34699904 \\\hline %  8 
 7 & 56 & 367 & 829  & 38943104 \\\hline %  8 
\end{array}
$$
(For given $m$, the solutions are found by taking $k=1,2,3,...$ 
and checking factorizations $\ell_1\,\ell_2$ of $(2^{k} (2^{k+1} - 1) - m)/2 $,
%%  $2\,\ell_1$ of $2^{k-1} (2^{k} - 1) - m $, %=2\,\ell_1\,\ell_2$ 
to see whether the resulting $p_i$ are prime.)~
In the first two lines we recognize the previous examples. Indeed, for 
$\ell_1 = -2^{k-1}$, $p_1 = 2^{k}-1$, $p_2 = Q$,
%% $\ell_1 = -2^{k-2}$, $p_1 = 2^{k-2}-1$, $p_2 = Q$, 
we get Proposition~\ref{propdec20}.

\Proof
For  $ \sol=2^{k}\,p_1\,p_2$\,, \,$\sigma(\sol)-2\,\sol = (2^{k+1}-1)(p_1+1)(p_2+1)-2^{k+1}\,p_1\,p_2
	= 2^{k+1}\,(p_1+p_2+1)-(p_1+1)(p_2+1) = 2^{k+1}\,(2^{k+1}-1)-4\,\ell_1\,\ell_2 = 2\,m$.
%% VERSION k-1
%% For  $ \sol=2^{k-1}\,p_1\,p_2$\,, \,$\sigma(\sol)-2\,\sol = (2^k-1)(p_1+1)(p_2+1)-2^k\,p_1\,p_2
%%	= 2^k\,(p_1+p_2+1)-(p_1+1)(p_2+1) = 2^k\,(2^k-1)-4\,\ell_1\,\ell_2 = 2\,m$.





%Our goal was not to give a %In this introduction we do not aim at giving the 
%complete list of solutions to this particular equation,
%but we will turn back to this equation later in the paper.


%More solutions to this equation will be constructed in section~\ref{x=plq}.


\if0
%The above two theorems account for all solutions $x \le 10^7$ to the equation $ \sigma(x) = 2(x+6) $,
%except for the solution $x=54=2\cdot3^3$.
However, for the equation $ \sigma(x) = 2\,(x+28) $, the ``failure rate'' is somewhat higher.
This is explained as follows:
Solutions to $ \sigma(x) = 2\,(x+m) $ %which are neither 
not of the form $m\,p$ or %nor of the form 
$2^k\,p$, can be written $x=p^\ell q$ where $p$ is an odd prime, $\ell>1$, and $q%>1
$ is coprime to $p$.
As shown in section~\ref{x=plq}, a necessary condition is then $2(m+q)-\sigma(q)=0\pmod{\sigma(p^{\ell-1})}$.
For $q=2^k$, $\sigma(p^{\ell-1})$ must therefore divide $2m+1$,
which is much more restrictive for $m=6$ ($2m+1=13$ being only divisible by $\sigma(3^2)=1+3+9$, giving the solution $2\cdot3^3=54$) 
than for $m=28$ ($57=3\cdot19$ being divisible by $\sigma(3)$).

sigma(2^(k-1) p^L) - 2^k p^L - 2^k p = (2^k-1)(p^(L+1)-1)/(p-1)
\fi

%A096821  	 Solutions to Mod[sigma(x),x]=12 of the form p*(p+13)/2
% where p is a prime of form=2^j-13, of which j exponents are listed in A096818.
%	24, 304, 127744, 33501184, 8589082624, 10384593717069654320312270165377024, %822752278660603021077484591278411581166520461101278617407586304, %15177100720513508366558296147058741458142670970377727126573378340391656803557965824





\subsection{The equation $\sigma(x)=k\,(x+m)$}



We conclude this introduction by the following generalizations of the preceding theorems
to $k$--fold perfect numbers.
%~\ref{thm1'}:

%A further variant of Theorem~\ref{thm1'} is given by the following generalization:% of the preceding theorem:

\Theorem 1''
If\/ \,$ m $\, is a $ k $--perfect number, then the equation $ \sigma(x) = k(x+m) $
has infinitely many solutions, including all numbers of the form $ \sol= p \, m $, 
where $ p $ is a prime not dividing $ m $.

\Proof
The proof is the same as before, except for replacing 2 by $ k $. 
To write out the straightforward calculation here,
$$ \sigma(\sol)=\sigma(p \, m)=(p+1)\,\sigma(m)=(p+1)\,k\,m=k\,(p\,m+m)=k\,(\sol+m). \vspace*{-\baselineskip}$$

% T=672 => 5T = 3360

%Proposition~\ref{corA2} and \ref{cor32} given in the following sections are just two 
%other special
The particular cases of this Theorem~\ref{thm1''}, corresponding to $ k=3 $ and $ k=4 $,
will be developed in Corollary~\ref{corA2} and \ref{cor32}.

\Theorem 1b %1.4'
If $m$ is a $k$--perfect number and $p$ is a prime such that $p^t \mid m$ but
$p^{t+1}\ndiv m$, (\ie, $t \ge 0$ is the $p$--adic valuation of $m$), 
then $x = p^{t+1}\, m$ is a
solution of the equation $\sigma(x) = k\,(x+m)$.


\def\*{\,}

\Proof
For  $m = p^t \* m' $, $\gcd(m', p) = 1$,
and
$ x = p^{t+1} \* m = p^{2t+1} \* m' $, we have 
$\sigma(x) = \sigma(p^{2t+1})\,\sigma(m')
=\sigma(p^{2t+1})\,\sigma(m)/\sigma(p^{t})
=k\,m\,(p^{2t+2}-1)/(p^{t+1}-1) = k\,m\,(p^{t+1}+1) = k\,(x+m)$.


\def\*{\,}
\Example 1b
For $ t = 0 $, $ k = 2 $, we get Theorem~\ref{thm1'},
for $ t = 1 $, $ k = 2 $ we get Proposition~\ref{prop1a},
and for $ t = 0 $ and any $k$, we get the preceding Theorem~\ref{thm1''}.\\
Other examples with $t>0$ include the following cases:
\begin{itemize}
\item $k=3$, $T_1=120=2^3\*3\*5$ 
with solutions $\sol=1080=2^3\*3^{1+2}\*5$ and $\sol=1920=2^{3+4}\*3\*5$.
\item $k=3$, $T_2=672=2^5\cdot 3\cdot 7$, with solution $x=3^2\,T_2=6048$.
\item $k=4$, $Q_1=30240=672=2^5\cdot 3\cdot 7$, with solution $x=5^2\,Q_1=756000$.
\end{itemize}




%\section{More solutions of the form $ n=2^{k-1}pq $}
%Let us first have a look at several equations having solutions of the form  $ n=2^{k-1}pq $.


For the case where $q=k+1$ is a prime, we have the following additional results:


\def\perf{Q}
\Theorem (**)
If $\perf$ is a $(q-1)$--perfect number for some prime $q$, and $q^k - q - 1$ is a prime
such that $\gcd(q\,(q^k - q - 1), \perf ) = 1$, then $x = q^{k-1}\*(q^k - q - 1)\*\perf$
is a solution of the equation $\sigma(x) = q\, (x + \perf)$.



\Example ** \def\item{~\\$\bullet$ ~}	%~\begin{itemize}
\item
For $q = 2$, we have $\perf = 1$ and we get the same as Theorem~\ref{thm1} with $m=1$.
\item
Examples for $q=3$ and $q=5$ will be given in Example~\ref{ex**3} and~\ref{ex**5}.

\Proof %of (**) : 
This is the following theorem with $m=1$.

\if0
Suppose that $p = q^k - q - 1$ is prime. 
Then $k > 1$, and $p\ne q$ since for $q = 2$,  $q^k \ne 2 q + 1$ 
and for odd primes $q$, $q^k > 2 q + 1$.
Thus we have,
$
\sigma(x) = \sigma(q^{k -1})\,\sigma(q^k - q - 1)\,\sigma(m)
       = (q^k - 1)/(q - 1)\cdot(q^k - q)\cdot(q - 1)\, m
       = q \* (q^{k - 1} - 1) \* (q^k - 1)\* m
       = q\, (q^{k - 1}\, (q^k - q - 1) + 1)\, m
       = q \,(x + m)
$.
\fi


\Theorem (***) 
If $Q$ is a $(q-1)$--perfect number for some prime $q$ and $m\in\mathbb Z$,
then the equation
$$ \sigma(x)=q\,(x + m\,Q) $$
admits the solution $x=q^{k-1}\,p\,Q$ whenever $p=q^k-m\,q-1$ is prime and
such that $\gcd(q^{k-1}\,p, Q)=1$ and $\gcd(q^{k-1}, p)=1$ (\ie, $q\ne p$ or $k=1$).


\Proof %of (***):
With the given definitions and assumptions, we have\\
$\def\*{\,}
 \sigma(x) %= ?(q^(k-1)*p*Q)
%    = \sigma(q^{k-1})\*\sigma(p)\*\sigma(Q)
    = (q^k-1)/(q-1)\cdot(p+1)\cdot(q-1)\*Q
%    = (q^k-1)\*(q^k-m*q)\*Q
%    = q\*Q\,(q^(k-1)-m)\*(q^k-1)
%    = q\*(q^(k-1)*q^k-m*q^k-q^(k-1)+m)\*Q
%    = q\*(q^(k-1)\*(q^k-m*q-1)+m)\*Q
%    = q\*Q(x/Q + m)
 = (q^k\,p+q^k-p-1)\,Q = q\,(x+m\,Q)
$.
%So x is a solution of the equation ?(x)=q*(x + m*Q)


\Example *** \def\item{~}%\begin{itemize}
\item 
For $ m = 1 $, we get the preceding Theorem~\ref{thm(**)}.
\item 
For $ q = 2 $, we have $Q = 1$ and Theorem~\ref{thm1}; 
	and thus, for $m = 0$, Euclid's proposition.
%\end{itemize}


\if0
> Note that since p = q^k - m q - 1 is prime if m = 0 then there exist two
> cases (...)
> 2. k = 1, so  p = q - 1 = 2 and q = 3. Now since  gcd(q^(k - 1) p, Q) = 1 ,
> Q is an odd perfect number and we get :
>  
> If Q is an odd perfect number then x = 3^(1-1) 2Q = 2Q is a solution for the
> equation s(x) = 3x.

So the commonly accepted "fact" that there are no more than the 6 triply perfect numbers
2^3.3.5, 2^5.3.7, 2^9.3.11.31, 2^8.5.7.19.37.73, 2^13.3.11.43.127 
and 2^14.5.7.19.31.151
depends on the non-existence of odd perfect numbers ?

and more generally:
If Q is an odd k-perfect number, then x = 2^(t-1) Q 
is a solution to  sigma(x) = (2^t-1) k Q = (2^t - 1) k/2^(t-1) x

(k=2, t=2 gives the above; for k=4, t=2 resp. t=3 lead to
sigma(x) = 6x resp. sigma(x) = 7x ;
and the 6-perfect numbers are also said to be all known...)
\fi


\Theorem jan4
If $m$ is a $k$--perfect number and $2\,t$
%has s representations of the form 
is the sum of two distinct primes $p_1$ and $p_2$ such that
$\gcd(p_1\,p_2, m) = 1$, then %all the s numbers 
$p_1\,p_2\,m$ are solutions of the equation $\sigma(x) = k\,(x + (2\,t+1)\,m)$.


\Example jan4
For $k = 2$,  $m = 6$, $t = 50$ one has
$2\*t = 100 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53$,
so all the five numbers $11\cdot 89\cdot 6, 17\cdot 83\cdot 6$, $29\cdot 71\cdot 6$, 
$41\cdot 59\cdot 6$ and $ 47\cdot 53\cdot 6$ are
solutions of the equation $\sigma(x) =2\,(x + 606)$.


\Corollary jan4
All semi-primes of the form $p\,(2t - p)$, $p < t$, are solutions
for the equation $\sigma(x) = x + 2\,t + 1$.

 
\Proof [Proof of the Theorem]
With given hypotheses, for $x = p_1\,p_2\,m$
% p_1 + p_2 = 2t$,  
%$m is a k<perfect number , gcd(p1*p2, m) = 1, so 
we have
$ \sigma(x) %= \sigma(p1)\,\sigma(p2)\,s(m)
        = (p_1 + 1) \,(p_2 + 1)\,k\,m
        = k\,(p_1\,p_2\,m + (p_1 + p_2 + 1)\,m)
      = k\,(x + (2\,t+1)\,m) 
$.


\if0 *************** NEW THEOREMS ---- RESERVED FOR NEXT PAPER 
%%% This is IN SOME SENSE a generalisation of Prop.1.6 .

\Theorem jan6c %(***)
If  $m$ is a $k$--perfect number,  $p = 2t - 1$ is prime and $p$ does not divide $m$, 
then $x = m\,p^2$ is a solution for the equation $\sigma(x) = k\,(x + 2\,t\,m)$.

\Proof
$\sigma(x) = \sigma(m\,p^2) = k\,m\,(p^2 + p + 1)
 = k\,( m\,p^2 + 2\,t\,m) = k\,(x + 2\,t\,m)$.
 
\Example jan6c
For $k = 2$, $m = 6$, $t = 10$, since $2\,t - 1 = 19$  is prime,
  $x = 6\cdot 19^2 = 2166$ is a solution for the equation $\sigma(x) = 2\,(x + 120)$.
\\
For $k = 3$, $m = 120$, $t = 6 $, since $2\,t - 1 = 11$ is prime, 
$ x = 120\cdot 11^2 = 14520 $
is a solution for the equation $\sigma(x) = 2\,(x + 1440)$.

\Corollary jan6c
If $ 2\,t - 1$ is prime then $(2\,t - 1)^2$ is a solution for the equation
$\sigma(x) = x + 2\,t$.


\fi%%%%%%%%%%%%%%%%%%%%%%% END OF NEW THMS

\section{Equations of the form $\, \sigma(x)=2\,x-f(x) \,$}


In this section, we consider solutions to equations of the form $\, \sigma(x)=2\,x-f(x) \,$, 
where the right hand side may involve different functions of $\, x \,$.


%\subsection{Equations of the form $\, \sigma(x)=2\,x+k \,$}

In some sense this was already considered in the introduction, since
the equation $\sigma(x)=2\,(x+m)$ simply corresponds to a constant function 
equal to an even number, $f(x)=-2\,m$.

\subsection{Solutions to $\, \sigma(x)-2\,x = k \in 1+2\,\mathbb Z$}

It is seen that for any even constant on the right hand side, there are usually many solutions.
For an odd constant, however, things are quite different.
%~(
A short remark about this can be found in \S 196 of De~Koninck's book~\cite{Koninck},
who conjectures that there is at most a finite number of solutions for odd $k$.
%)~
%
~(Of course this does not apply to the special case $k=-1$, since any power of 2 is
a solution to $\sigma(x)=2\,x-1$, while it is not known whether there are any
other such \emph{almost perfect numbers}.)~
If $k$ is odd, then $\sigma(x)$ must be odd, which is the case if and only if $x$ is a square or twice a square.
~(Indeed, the factor $\sigma(p^e)=(p^{e+1}-1)/(p-1)=1+p+\dots+p^e$ is odd iff $p=2$ or there is an odd number $e+1$ of terms.)~

Sequence \seqnum{A140863} = (3, 7, 17, 19, 31, 39, 41, 51, 59, 65, 71, 89, 115, ...) lists odd numbers $k$ 
for which $\sigma(x)=2\,x+k$ is known to have a solution:
$$
\begin{tabular}{*{15}{c|}}
%forstep(i=1,999,2,for(x=1,1e4,sigma(x)==2*x+i|next;print(i" "x);break))
$k$ &  3 &  7  &  17 & 19 &   31  &  39 &  41  & 51 &  59 &  65 & 71 & 89 \\ \hline
$x$ & 18 & 196 & 100 & 36 & 15376 & 162 & 1352 & 72 & 968 & 200 & 392 & 144\\ \hline
\end{tabular}
$$
Sequence \seqnum{A082731} lists the smallest solution to $\sigma(x)=2\,x+k$ for ``any'' $k\in\mathbb N$.

                    

The list of odd $k$ such that $\sigma(x)=2\,x-k $ has a solution starts as follows:
$$
\begin{tabular}{*{15}{c|}}
%forstep(i=1,999,2,for(x=1,1e4,((sigma(x^2)==2*x^2-i & t=1))|(sigma(2*x^2)==4*x^2-i & t=2))& !print([i,x^2]) & break))
$k$ & 1 & 5 &  7 &   11   & 19 & 25 &  37 & 41 &  47 &  61  &  71 &  85 & 109\\ \hline
$x$ & 1 & 9 & 50 & %244036
		$ 494^2 $ & 25 & 98 & 484 & 49 & 225 & 2888 & 676 & 242 & 121\\ \hline
\end{tabular}
$$
Sequence \seqnum{A082730} lists the smallest solution to $\sigma(x)=2\,x-k$ for $k\ge0$.%\in\mathbb N\cup\{0\}.

% 5  19  41  109   %% 109 = 110 - 1 = 11*10 -1;  41 = 7*6 - 1 
% 32 52  72  112

Concerning subsequences of \seqnum{A140863} (odd $k$ such that $\sigma(x)-2\,x=k$ has a solution), 
we have the following results.

\Proposition ODD1
The sequence \seqnum{A000668} of Mersenne primes is a subsequence of
\seqnum{A140863},
since if $M_p=2^p-1$ is prime, then $\sol = 2^{p-1}\*(2^p - 1)^2$ 
is a solution to $\, \sigma(x)-2\,x = M_p $.

\Example ODD1
\begin{itemize}
\item $p = 3$ ; $x = 2^2\*7^2 = 196 $ is a solution to %for the equation 
$\sigma(x) = 2\,x + 7$.
\item $p = 5$ ; $x = 2^4\*31^2 = 15376 $ is a solution for the equation 
$\sigma(x) = 2\,x + 31$.
\item $p = 7$ ; $x = 2^6\*127^2 = 1032256 $ is a solution of %for the equation 
$\sigma(x) = 2\,x + 127$.
\end{itemize}

\Proof
%% MFH: replaced k by M_p; 18.1.10
For prime $M_p=2^p-1$ and $\sol = 2^{p-1}\*M_p^2$, we have
$ \sigma(\sol) - 2\,\sol =$ $ M_p \* (M_p^3 - 1) / (M_p - 1) - 2^p \* M_p^2
                    = M_p\*(M_p^2 + M_p + 1 -(M_p+1)\,M_p )
                    = M_p $.

This Proposition is actually a special case of the following

\Theorem ODD2
If $M = 2^p - 1$ is a Mersenne prime and $t$ is a non-negative integer then 
$x = (2^t M)^2$ is a solution for the equation $\sigma(x) = 2\,x + k$, where 
$k = (M + 1)\*(2^{2\,t+1} - 1) - M^2$. Such values of $k$ are therefore a subsequence
of \seqnum{A140863}.

\Proof 
$\sigma(x) - 2\,x = (2^{2t+1} - 1)\,(M^2 + M + 1) - 2^{2t+1} M^2 = (M + 1)\*
(2^{2t+1} - 1) - M^2 = k$.

\Example ODD2
For $t=(p-1)/2$, this yields the preceding Proposition~\ref{propODD1}, 
and the previous examples apply.
%\\
For $ t = 0 $ we get: If $ M = 2^p - 1 $ is prime, then $ x = M^2 $ 
is a solution for the equation
$$ \sigma(x) = 2x - 4^p + 3\cdot 2^p - 1 ~.$$
%
Some particular cases are:
\begin{itemize}
\item $p = 2$ ; $x = 9$ is a solution for the equation $\sigma(x) = 2\,x - 5$.
\item $p = 3$ ; $x = 49$ is a solution for the equation $\sigma(x) = 2\,x - 41$.
\item $p = 5$ ; $x = 961$ is a solution for the equation $\sigma(x) = 2\,x - 929$.
\end{itemize}

We also have the following similar result, related to \seqnum{A140863} and Mersenne primes:

\Proposition ODD3
If $M = 2^p -1$ is prime, then $x = (M+1)\,M^2 = 2^p (2^p -1)^2$  
is a solution for the equation
$\sigma(x) = 2\,x + k$, where $ k = 4^p + 2^p - 1$. 

\Proof
As before, a straightforward calculation gives
$\sigma(x) - 2\,x = \sigma(2^p (2^p -1)^2 ) - 2^{p+1} (2^p-1)^2
                    =  (2^{p+1} - 1)\,((2^p -1)^3 - 1) / (2^p - 2) - 2^{p+1} (2^p - 1)^2
                    = 4^p + 2^p - 1
                    = k$.

\Example ODD3
\begin{itemize}
\item%  
For $ p = 2 $, we get $x = 36$  as a solution to $\sigma(x) = 2\,x + 19$.
\item%  
The prime \,$ p = 3 $\, yields \,$ x = 392 $\, as solution of\, % the equation
 $\sigma(x) = 2\,x + 71$.
\item% 
For $ p = 17 $ we have $ x = 2251765454077952 $ as a solution of the equation $\sigma(x) = 2\,x + 17180000255$.
\end{itemize}


An extended numerical search motivates the following conjectures:


\Conjecture C1
If $M$ is a Mersenne prime, then the equation $\sigma(x) - 2\,x = M$
has only one solution, $ x = M^2\*(M+1)/2 $.


\if0 %%% PARI CODE
check(p,L=999999)={ isprime( M=2^p-1 )|return("2^p-1 is not prime");
for(i=M,L, sigma(i^2)-2*i^2==M & print([i^2,i,factor(i)]); 
sigma(2*i^2)-4*i^2==M & print([2*i^2,i,factor(i)],2))}
forprime(p=2,999,ispseudoprime(2^p-1)|next;print1([p,2^p-1]" : ");check(p,99*2^p))
\fi

\Conjecture C2
If $M$ is a Mersenne prime, then the equation $\sigma(x) - 2\,x
= M^2+3\,M+1   % = (M+1)^2+M
$ has only one solution, $ x = (M+1)\*M^2 $.


We have verified that there is no counterexample less than $ L = 2\cdot10^{17} $
to these conjectures, for all Mersenne primes $\le M(89)=2^{89}-1$.
This seems significant at least for the smaller Mersenne primes, 
for which the known solution is significantly smaller than this search limit.  
Obviously, there was not much hope to find a counter-example
below this limit for the larger Mersenne primes, since from $M(19)$ on,
the known solution is already of the order of magnitude of $L$ or above.



\if0
% We have s(p^2a) - 2 p^2a = -( p^{2a}(p-2) + 1)/(p-1) --- check when this is prime:
% result: (quite often)
forprime(p=1,99,t=1;for(a=1,39,ispseudoprime( t=(p^(2*a)*(p-2)+1)/(p-1) ) &  print1([p,a,t]", ") );t|print)

(18:28) gp > S=[];for(i=1,999999,if( setsearch(S,t=f(i^2)), print1(t","), S=setunion(S,Set(t)));if( setsearch(S,t=f(2*i^2)), print1
(t","), S=setunion(S,Set(t))))
-1,-1,-1,-1,-1,-1,-1,-41,-1,-1,199,-1,-1,-19,-1,-1,269,-1,-1,-6805,-1,-1,-505,-667,-1201,-4285,79091,-1,-1,-26821,-16237,344797,-145
471,-1,-1,-1541,68615,-72937,-7831,370709,-21281,-27347,-209287,-1,-1,136985,-34339,3138035,-1,-1,47969,-32598385,-2103949,92329173,

ffk(k)={c=0;for(i=1,1e9,f(t=i^2)==k & c++ & print1("f("t")="k", "); f(t=2*i^2)==k & c++ & print1("f("t")="k", ");c>1&break)
\fi


We conclude this subsection with two results concerning solutions for a
negative constant term.

\Proposition ODD9
The equation $\sigma(x)=2\,x-k$ has the solution $x=p^2$
whenever $k=p(p-1)-1$ for some prime $p$.

This is a special case ($t=2$) of the following

\Theorem ODD9
When $k$ is of the form $(p^{t+1} - 2\*p^t + 1) / (p - 1)$  where $p$ is prime, then
$x=p^{t}$ is a solution for the equation $\sigma(x) = 2\*x - k$.

\Proof
Again by a straightforward calculation,
$ \sigma(p^{t}) - 2\*p^{t}
 = ( p^{t+1} - 1 )/( p - 1 ) - 2\*( p^{t+1} - p^{t} )/( p - 1 )
 = - ( p^{t+1} - 2\,p^{t} + 1 )/( p - 1 )
$.



\subsection{Equations involving the number-of-divisors function}

We denote by $\,d(n)\,$ the number of positive divisors of $n$.

\Theorem 2
If $\,m\,$ is a natural number and $\,4^m+2^m-2t-1\,$ is an odd prime, 
then $\,\sol= 2^{m-1}\,(4^m+2^m-2\,t-1)\,$ is a solution of the equation $$ \sigma(x) = 2\,x - 2^{d(x)} + 2\,t. $$



\Proof
This follows by straightforward calculation, using again equation \eqref{eq1} 
and $\,d(\sol )=2\,m\,$ here:
$\sigma(\sol ) = (2^m-1)\, ( 4^m+2^m-2\,t)
     = 2^m \, ( 4^m+2^m-2\,t-1+1)-(4^m+2^m-2\,t)
     = 2^m \, ( 4^m+2^m-2\,t-1)-(4^m-2\,t) 
     = 2\,\sol-2^{2\,m}+2\,t = 2\,\sol-2^{d(\sol)}+2\,t$. 


\Corollary 2.1    For $t = 0$, we get: If \,$4^m+2^m-1$\, is prime 
(\seqnum{A098855}),
%($p$ = A098855$(k)$,
then $2^{m-1}\,(4^m+2^m -1)$ (\seqnum{A110082}) is a solution of the equation 
$\,\sigma(x) = 2\, x - 2^{d(x)}\,$.


% 1,2,3,4,6,10,16,24,26,35,52,55,95 = \seqnum{A098855} ; x = A110082
% for(m=1,99,isprime(4^m+2^m-1)&print1(m","))            }


\Corollary 2.2   For $\, t = 1 \,$, we find solutions to $\, \sigma(x) = 2\,x - 2^{d(x)} + 2 \,$ 
of the form  $\, \sol= 2^{m-1}\,(4^m + 2^m - 3) \,$, 
with \,$m=$ {\rm 1, 2, 4, 6, 8, 24, 44, 76, 144, 492, 756, 1564, ...}.


%%%   for(m=1,9999,ispseudoprime(4^m+2^m-3)&print1(m","))     %%% not in OEIS



\Corollary 2.3    For \,$ t = 2 $\,, solutions to \,$ \sigma(x) = 2\,x - 2^{d(x)} + 4 $\, are given by
$ \sol= 2^{m-1}\,(4^m + 2^m -5) $ with
$ m = 3,5,9,11,25,33,133,189,635,1235,1685,1849, ... $. 

%%%   for(m=1,999,ispseudoprime((4^m + 2^m -5))&print1(m","))   %%% not in OEIS



\section{Equations involving Euler's totient function $\phi$}

In this section  %is the continuation of the preceding subsection, 
we deal with equations which are not really ``deformations'' of Euclid's formula
in the strict sense, since the right hand side does not start with the term $2\,x$.
However, calculations are very similar to what precedes, 
so it seemed justified to present the following results in this place.


We use the standard notation $\phi(n)$ for Euler's totient function, 
giving the order of the group $(\mathbb Z/n\mathbb Z)^*$, \ie, the number
of positive integers not exceeding $n$ and coprime to $n$.
%
Equations similar to those discussed here have been studied by Guy~\cite{desires} and Zhang~\cite{zhang}.


\Theorem 4
If $\,m\,$ is a natural number and $\,2^{m+2}-2\,t\,(m+1)-2\,k-1\,$ is an odd prime, 
then $\,\sol= 2^m\, (2^{m+2}-2\,t\,(m+1)-2\,k-1)$ is a solution 
of the equation $\,\sigma(x) = 4\,\phi(x) + t\, d(x) + 2\,k\,$.


\Proof
In this case, $ d(\sol) = 2\,(m+1)$ and $\phi(\sol) = 2^{m-1}\,(2^{m+2}-2\,t\,(m+1)-2\,k-2)$, so
\begin{align*}
4\,\phi(\sol)+t\,d(\sol)+2\,k
&= 2^{m+1}\, (2^{m+2}-2\,t\,(m+1)-2\,k-2)+2\,t\,(m+1)+2\,k \\ 
&= (2^{m+1}-1)\, (2^{m+2}-2\,t\,(m+1)-2\,k-2)
	\nonumber\\&{~~~}
	+(2^{m+2}-2\,t\,(m+1)-2\,k-2)+2\,t\, (m+1)+2\,k\\ 
%&= (2^{m+1}-1)\, (2^{m+2}-2t(m+1)-2k)-2\, (2^{m+1}-1)
%	\nonumber\\&{~~~}
%	+(2^{m+2}-2\,t\,(m+1)-2\,k-2)+2\,t\, (m+1)+2\,k\\ 
&= (2^{m+1}-1)\, (2^{m+2}-2\,t\,(m+1)-2\,k)  
%&= \sigma(2^m)\, \sigma(2^{m+2}-2t(m+1)-2k-1)\\ 
%&= \sigma(2^m\, (2^{m+2}-2t(m+1)-1)) \\ 
= \sigma(\sol).\\[-2\baselineskip]\end{align*}




\Corollary 4.1
For $\,t = 0\,$, we get: If $\,m\,$ is a natural number and $\,2^{m+2}-2\,k-1\,$ is an odd prime, 
then $\,\sol= 2^m\cdot (2^{m+2}-2\,k-1)\,$ is a solution of the equation $\,\sigma(x) = 4\,\phi(x) + 2\,k\,$.

\Corollary 4.2
For $\,k = 0\,$, we have: If $\,m\,$ is a natural number and $\,2^{m+2}-2\,t\,(m+1)-1\,$ is an odd prime, 
then $\,\sol= 2^m\cdot (2^{m+2}-2\,t\,(m+1)-1)\,$ is a solution of the equation $\,\sigma(x) = 4\,\phi(x) + t\,d(x)\,$. 

\Corollary 4.3
Take $\,t = k = 0\,$ and $\,m = p-2\,$. If $\,2^p-1\,$ is a Mersenne prime, then $\,2^{p-2}\,(2^p-1)\,$ is a solution of the equation $\,\sigma(x) = 4\,\phi(x)\,$. 

Parts of these results have already been contributed as comments to sequence 
\seqnum{A068390} by the first author.
% [Firoozbakht 2005].

%the following is called Thm.10 by F.F.
\Theorem 5
If $3\cdot 2^m-2\,t\,(m+1)-1$ is an odd prime, 
then $\sol= 2^m\, (3\cdot 2^m-2\,t\,(m+1)-1)$ is a solution of the equation $\sigma(x) = x + 2\,\phi(x) + t\,d(x)$. 

\Proof
Here, $ d(\sol ) = 2\,(m+1)$ and $\phi(\sol ) = 2^{m-1}\, (3\cdot 2^m-2\,t\,(m+1)-2)$, so
\begin{align*} \lefteqn{\sol +2\,\phi(\sol )+t\, d(\sol )}~~~~&\\
%          &  = 2^m\, (3\cdot 2^m-2t(m+1)-1)
%	\\&~~~~{}
%	+2^m\, (3\cdot 2^m-2\,t\,(m+1)-2)+2\,t\,(m+1) \\ 
%	&= 2^{m+1}\, (3\cdot 2^{m-1}-t\,(m+1)-1)
%		+2^m+2^{m+1}\, (3\cdot 2^{m-1}-t\,(m+1)-1))+2\,t\,(m+1)\\ 
            &= 2^{m}\, (3\cdot 2^m-2\,t\,(m+1)-1)\cdot 2 - 2\cdot 2^{m-1} +2\,t\,(m+1)\\ 
        &= (2^{m+1}-1+1)\, (3\cdot 2^m-2\,t\,(m+1)-1) - 2^m + 2\,t\,(m+1)\\ 
        &= (2^{m+1}-1)\, (3\cdot 2^m-2t(m+1))-2^{m+1}+1
            \\&\phantom{(2^{m+1}-1+1)~} +(3\cdot 2^m-2\,t\,(m+1)-1) - 2^m + 2\,t\,(m+1)\\ 
%            &= (2^{m+1}-1)\,(3\cdot 2^m-2t(m+1))\\ 
        &= \sigma(2^m) ~ \sigma(3\cdot 2^m-2\,t\,(m+1)-1)\\ 
        &= \sigma(2^m \,(3\cdot 2^m-2\,t\,(m+1)-1)) 
        = \sigma(\sol )~.\\[-2\baselineskip]
\end{align*} 


\Corollary 5.1
For $t = 0$, we get:~ If\, $3\cdot 2^m-1$ is an odd prime, then
$\sol= 2^m\,(3\cdot 2^m-1)$ is a solution of the equation $\sigma(x) = x+2\,\phi(x)$. 


\Remark 5.1
Numbers of this form are listed in sequence \seqnum{A097215}. % of \OEIS.


\Theorem 6
If $p = 7\cdot 2^m-k\,(m+3)-2\,t-1$ is a prime greater than 3, 
then $\sol= 3\cdot 2^{m+2}\,p$ is a solution of the equation $\phi(x)+\sigma(x) = 3\,x+k\, d(x)+ 8\,t$.


\Proof
For $\sol=3\cdot 2^{m+2}\,p$, $ d(\sol) =2\cdot(m+3)\cdot 2 = 4\,(m+3)$,
$\phi(\sol) = 2^{m+2}\,(p-1)$ and
$\sigma(x) = 4\,(2^{m+3}-1)\,(p+1)$, so
$\phi(x)+\sigma(x) = p\,(2^{m+2}+8\cdot2^{m+2}-4) -2^{m+2}+8\cdot 2^{m+2}-4
 = 9\cdot 2^{m+2}\,p -4\,p+4\,(7\cdot 2^m)-4 =3\,(3\cdot 2^{m+2}\,p)-4\,(p-7\cdot 2^m+1)
 = 3\,\sol-4\,(-k\,(m+3)-2\,t) %= 3\,\sol+4\,k\,(m+3)+8\,t 
 = 3\,\sol+k\,d(\sol)+8\,t$. 


\Corollary 6.1     Using the theorem with $k = 0$, we get: 
If $ p = 7\cdot 2^m-2\,t-1$ is a prime greater than 3, 
then $\sol= 3\cdot 2^{m+2}\,p$ is a solution of the equation $\phi(x)+\sigma(x) = 3\,x+ 8\,t$. 

\Corollary 6.2     Consider $t = 0$: If $p = 7\cdot 2^m-k\,(m+3)-1$ is a prime greater than 3, 
then $\sol= 3\cdot 2^{m+2}\,p$ is a solution of the equation $\sigma(x)+\phi(x) = 3\,x+k\,d(x)$. 

\Corollary 6.3     For $t = k = 0$, we get: If \,$p = 7\cdot2^m-1$\, is prime, 
then $\,\sol= 3\cdot 2^{m+2}\,p\,$ is a solution of the equation $\,\sigma(x)+\phi(x) = 3\,x\,$. 

Parts of these results have been submitted as comments to sequence 
\seqnum{A011251}.
% [Firoozbakht 2005, 2007].




\section{Solutions to $\, \sigma(x)=3\,x-f(x) \,$}

In this section we consider equations which can be seen as ``deformations'' 
of the definition of triply-perfect numbers, $\sigma(T)=3\,T$.


\subsection{The special case $\, \sigma(x) = 3\,x - C \,$}

First we discuss solutions to equations $\, \sigma(x) = 3\,x - C \,$ 
for some particular constants $ C $. 
%
Let us first recall that Theorem~\ref{thm1''} with $k=3$ yields 

\Corollary A2    If $T$ is a triperfect number (A005820), 
then the equation $ \sigma(x) = 3\,(x+T) $ has infinitely many solutions, 
which include all numbers of the form $\sol = p\,T$, where $p$ is a prime not dividing $T$. 

%\Proof
%As already mentioned, this is %follows from
%Theorem~\ref{thm1''} with $k=3$. 

%    For $\sol= p\,T$, where $p$ is a prime which does not divide $T$,
% we have $\sigma(n) = \sigma(p\,T) = \sigma(p)\,\sigma(T) = 3\,(p+1)\,T
% = 3\,p\,T+3\,T = 3\,(n+T)$. 

\Example A2
%\begin{itemize}\item
For $T_2=672=2^5\cdot 3\cdot 7$, $p=5$ gives the solution $x=5\,T_2=3360$.
\\%\item
%For $T_1=120=2^3\cdot 3\cdot 5$, all primes $p>5$ yield solutions $x = 120\,p$.
For $T_1=120=2^3\cdot 3\cdot 5$, all primes $p>5$ yield a solution $x = 120\,p$.
%\end{itemize}

\if0%%%% OLD VERSION
\Theorem A1    If\/ $P$ is an even perfect number greater than 6, 
then the equation $\sigma(x) = 3\,x - P$ has infinitely many solutions, 
which include all numbers of the form $ \sol= 3^m\,P $, $m=0,1,2,...$. 

\Proof  Numbers of the form $ \sol= 3^m\,P $,  $m = 0, 1, 2$,...  are solutions for the equation, 
because according to Euler's result, $P=2^{q-1}M_q$ has only the prime factors $2$ and $M_q$; 
therefore $\sigma(n) = \sigma(3^m\,P) = \sigma(3^m)\,\sigma(P) = (3^{m+1}-1)\,P = 3^{m+1}\,P - P$, 
so $\sigma(n) = 3\,n - P$. 
\fi

\Proposition A1
If\/ $P$ is a perfect number, then $x=P$ is a solution to the equation $\sigma(x) = 3\,x - P$,
and if 3 does not divide $P$, then this equation has infinitely many solutions, 
including all numbers of the form $ \sol= 3^m\,P $, $m\in\mathbb N $. 

This is a particular case ($q=3$) of the more general

\Theorem A
If\/ $q$ is a prime and $Q$ is a $(q-1)$--perfect number, 
then $x=Q$ is a solution to the equation $\sigma(x) = q\,x - Q$,
and if $q$ does not divide $Q$, then this equation has infinitely many solutions, 
including all numbers of the form $ \sol= q^m\,Q $, $ m\in\mathbb N $. 

\Proof The first statement is obvious, and assuming that $q \ndiv Q$, we have\\ 
$\sigma(x) = \sigma(q^m)\,\sigma(Q) = (q^{m+1}-1)/(q-1)\cdot(q-1)\,Q = (q^{m+1}-1)\, Q = q\,x - Q $.

\Example A1
\begin{enumerate}
\item[(i)]
Since $P = 2^2\,(2^3 -1) = 28$ is a perfect number,
$\sol=28$, $28\cdot3$, $28\cdot 3^2$, ... are some solutions of the equation $\sigma(x) = 3\,x - 28$.
%
%\Example A2
\item[(ii)]
For $P = 2^4\,(2^5 -1) = 496$, we get that $496,~ 496\cdot3,~ 496\cdot3^2$, ... are some solutions of the equation $\sigma(x) = 3\,x - 496$. 
%
%\Example A3
\item[(iii)]
With $P = 2^6\,(2^7 -1)  = 8128$, we have that $8128,~ 8128\cdot3,~ 8128\cdot3^2$, ... are some solutions of the equation $\sigma(x) = 3\,x - 8128$.
\\
The number $6508$ is another solution, which is not of the mentioned form.
\end{enumerate}

The following theorem gives solutions to a more general equation
than the one considered in the previous proposition.
The special case $t=0$ yields the same equation, but not all
%but the theorem then only gives one 
of the earlier solutions.

%including that of the previous theorem for $t=0$ ;
%for $t=0$ we get the equation of the preceding theorem, but only one solution.
%the preceding one.
%
%ization of the preceding one 
%in the sense that $t=0$ gives the equation considered he considered equation gives solutions to a more general equation than Thm.2:


\Theorem A3    If\/ $t$ is an integer,  
$p = 3^m+2\,t $  is prime and $P$ is a perfect number such that \,$\gcd(3\,p,P)=1$, 
then \,$\sol= 3^{m-1}\,p\,P$\, is a solution of the equation \,$ \sigma(x) = 3\,x - (2\,t+1)\,P $. 

\Proof
This is a special case ($q=3$) of the following Theorem~\ref{thmAA}.
% but for the sake of completeness,
%% This could be checked by straightforward calculation, but it also follows 
% $\sigma(n) = \sigma(3^{m-1})\,\sigma(p)\,\sigma(P)
% = (3^m-1)\,(p+1)\,P = 3^m\,p\,P + (3^m - (p+1))\,P = 3n - P\,(2t+1)$. 


\Example 31
For $t = -1$, all numbers $m$ such that \,$m<2000$\, and \,$3^m - 2$\, is prime, are: 
{\rm2, 4, 5, 6, 9, 22, 37, 41, 90, 102, 105, 317, 520, 541, 561, 648, 780, 786, 957} 
and $1353$ (\seqnum{A014224}).
%	A014224  	 	 Numbers n such that 3^n - 2 is prime. 
From these we obtain 20 solutions $3\,(3^2 - 2)\,P$,  $3^3\,(3^4 - 2)\,P$, ... , $3^{956}\,(3^{957} - 2)\,P$\, and \,$3^{1352}\,(3^{1353} - 2)\,P$\, 
of the equation \,$\sigma(x) = 3\,x + P$, for any even perfect number~$P$. 


\Example 32
%For $t = 1$, the numbers $0<m<2000$ such that $3^m + 2$ is prime are 
For $t = 1$, the numbers $m>0$ such that $3^m + 2$ is prime are 
{\rm 1, 2, 3, 4, 8, 10, 14, 15, 24, 26, 36, 63, 98, 110, 123, 126, 139, 
235, 243, 315, 363, 386, 391, 494, 1131, 1220, 1503}, %\,and\,
$1858...$ (\seqnum{A051783}).
From these we obtain the solutions $(3^1+2)\,P$,  $3^1\,(3^2+2)\,P$, ..., 
$3^{1502}\,(3^{1503}+2)\,P$, %\, and\, 
$3^{1857}\,(3^{1858}+2)\,P$,...
of the equation $\sigma(x) = 3\,(x - P)$, for any even perfect number~$P$. 


The previous theorem is a special case %(obtained for $k=3$) 
of the following more general result:


\Theorem AA % Thm 4.8 in current version
% If $t$ is a nonzero integer, $q$ is prime,  $p = q^m + 2\,t$ is also prime, 
% $Q$ is a $(q-1)$--perfect number and $\,\gcd(p\,q, Q) = 1\,$, then
% $\,\sol= q^{m-1}\,p\,Q\,$ is a solution of the equation
% \,$\sigma(x) = q\,x - (2\,t+1)\,Q$\,. 
If $Q$ is a $(q-1)$--perfect number for some prime $q$, then for all integers 
$t$, the equation
\begin{equation}\label{AA}
\,\sigma(x) = q\,x - (2\,t+1)\,Q\,
\end{equation}
has the solution $\,\sol= q^{k-1}\,p\,Q\,$
whenever $k\in\mathbb N$ is such that $p = q^k + 2\,t$ is prime, 
$\,\gcd(q^{k-1},p)=1\,$ %%% would like to get rid of this
(\ie, $q\ne p$ or $k=1$)
and $\,\gcd(q^{k-1}\,p, Q) = 1\,$.
%and $\,\gcd(p\,q, Q) = 1\,$ 


\Proof
$\sigma(\sol) = \sigma(q^{k - 1})\,\sigma(p)\,\sigma(Q)
 = (q^k - 1)/(q-1)\cdot(p + 1)\,(q-1)\,Q = q^k\,(p + 1)\,Q - (p + 1)\,Q =
q^k\,p\,Q + (q^k - (p+1))\,Q = q\,\sol - (2\,t + 1)\,Q\,$. 


\Remark AA
For $t=-\frac12(m\,q+1)$, we get back theorem~\ref{thm(***)}.


Finally, recall that from Theorem~\ref{thm(**)} we have for $q=3$:

\def\perf{P}
\Proposition **3
If $\perf$ is an even perfect number not divisible by 3 (\ie, $\perf>6$), then
$$\, \sigma(x) = 3\,(x+\perf) \,$$
admits the solution $x=3^{k-1}\,p\,\perf$ whenever 
%%$5^k-6$ is prime ($k\in$ \seqnum{A165701}) and 
$p=3^k-4$ is prime ($k\in$ \seqnum{A058959}).
%corr.6.1.10, was : A156555 = primes of the form....
% and and does not divide $\perf$. %% not needed - see comment in example


\Example **3
For $q=3$, $k\in$ A058959 = (2, 3, 5, 21, 31, 37, 41, 53, 73, 101, 175, 203, 225, 455, 557, 651, ...)
corresponds to a prime $3^k-4 \in$ \seqnum{A156555} = (5, 23, 239, 10460353199, 617673396283943,...) 
and yields solutions $x=3^{k-1}\,(3^k-4)\,\perf$ to 
$\sigma(x)=3\,(x+\perf)$ for all even perfect numbers $\perf>6$
(since $3^k-4$ is always odd and can never be equal to $2^p-1$):
%,except for $m=6$ which is divisible by 3: 
\\
For $\perf=28$ we have $x=420$, 5796, 542052, ...; 
for $\perf=496$ we get $x= 7440$, 102672, 9602064, ...,
and $\perf=8128$ leads to $x=121920$, 1682496, 157349952, ...
%
% t=1; A058959=vector(10,i,while(!isprime(3^t++-4),);3^t-4)
% t=1; A156555=vector(10,i,while(!isprime(3^t++-4),);3^t-4)
% forprime(p=1,19,isprime(Mp=2^p-1)|next;print(vector(3,i,[/*sigma*/(x=(A156555[i]\3+2)*A156555[i]*m=2^(p-1)*Mp),m]/*-3*(x+m)*/)))



\Proposition dec29
If $p = (m + 8 - 2^{k+4})/(2^k - 8)$ is a prime greater than 5, then 
$x = 2^k\cdot 15\, p$ is a solution for the equation $\sigma(x) = 3\,(x + m)$.

\Proof
For any prime $p>5$,
$\sigma(2^k\,15\,p)-3\cdot 2^k\cdot 15\,p =
3\,\bigl[ 8\,(2^{k+1}-1) + p\,(2^k-8)\bigr]$,
which equals $3\,m$ by hypothesis.

\Example dec29
If $m = 672$, we need a prime $p=(680-2^{k+4})/(2^k-8)$.
\\
For $k = 4$, we obtain $p = 53$ and $x = 2^4\cdot 3\cdot 5\cdot 53 = 12720$.
%%% THE SOLUTION 12720 HAD BEEN MENTIONED BY THE REFEREE.
\\
For $k = 5$, we get $p = 7$ and  the solution $x = 2^5\cdot 3\cdot 5\cdot 7 = 3360$
already known as $x=5\,m$ from Corollary~\ref{corA2} of Theorem~\ref{thm1''}.



\subsection{The case $\,\sigma(x)=3\,x-3^{d(x)}-k\,$}


\Theorem 3	If $\,2\cdot 3^m-1\,$ is prime ($m\in$ A003307), 
then $\,\sol= 3^{m-1}\,(2\cdot 3^m-1)\,$ is a solution of the equation\vspace*{-1ex}
\begin{equation}\label{eq.3}
 \sigma(x) = 3\,x - 3^{d(x)} ~.
\end{equation} 

\Proof $d(\sol ) = 2m$ and $\sigma(\sol ) = \sigma( 3^{m-1}(2\cdot 3^m-1))
     = \sigma(3^{m-1})\cdot \sigma(2\cdot 3^m-1)
                = (3^m-1)/2\cdot (2\cdot 3^m)
                = 3\cdot (3^{m-1}\cdot (2\cdot 3^m-1-3^m))
                =3\,\sol -3^{2m} = 3\,\sol -3^{d(\sol )}$.

% A003307(Nmax=900)=for(m=1,Nmax,ispseudoprime(2*3^m-1)&&print1(m", "))
% 1, 2, 3, 7, 8, 12, 20, 23, 27, 35, 56, 62, 68, 131, 222, 384, 387, 579, 644,

\Example 3
Sequence A003307 starts with $m=$ {\rm1, 2, 3, 7, 8, 12, 20, 23, 27, 35, 56, 62, 68, ...}. 
These numbers correspond to solutions $\sol=5,$ {\rm 51, 477, 3187917, 28695627, 188286180507, 8105110304875691067, ...} of equation~\eqref{eq.3}.

% T3(m)={ my(\sol =3^(m-1)*(2*3^m-1)); if( ! isprime(2*3^m-1),
% (Str(2*3^m-1,"=2*3^m-1 is not prime")),
% [m,23^m-1,\sigma(\sol ),numdiv(\sol ),3^numdiv(\sol ),log(-sigma(\sol )+3^numdiv(\sol ))/log(3)]}

% for(m=1,29,isprime(2*3^m-1)&print(T3(m)",")) \\ confirmed : last term = 1st term



%%%%%%%%% refereee suggests not to say " at most one" %%%%%%%%%%%%%%%%%%%%
%For some $k$'s we found at most one solution for the equation
%For some nonzero values of $k$, we found solutions to the equation
Let us now consider the following equation for some particular $k\in\N$,
\begin{equation}\label{eq32}% at present eqn (4)
	\sigma(x) = 3\,x - 3^{d(x)} - k ~.
\end{equation}
%as follows.

Let us start with two families of very simple solutions:


%%%%%%%%% refereee suggested to replace m by j in what follows %%%%%%%%%%%%%%%%%%%%

\Proposition 321
If $k = 4\,\ell $ and $p=2\,\ell +5$ is prime, then $p$ is a solution of~\eqref{eq32}. 

\Proof We have $\,\sigma(p) = p+1 = 2\,\ell+6 = 3\,(2\,\ell+5) - 3^2 - 4\,\ell  
= 3\,p - 3^{d(p)} - k\,$, so $p$ is a solution as claimed. 


\Example 321 Below we list a table with values $k=4\,\ell$ for which $p=2\,\ell +5$ 
is a solution to equation~\eqref{eq32}, according to this proposition:
$$
	\begin{array}{*{19}{c|}}
k & 0& 4& 12& 16& 24& 28& 36& 48& 52& 64& 72& 76& 84& 96
& 108& 112% 124& 132% 136 148 156 168 184 192 196 204 208 216 244
% 252 264 268 288 292 304 316 324 336 348 352 372 376 384 388
\\\hline
p& 5& 7& 11& 13& 17& 19& 23& 29& 31& 37& 41& 43& 47& 53
& 59& 61%& 67& 71 % 73 79 83 89 97 101 103 107 109 113 127 131
% 137 139 149 151 157 163 167 173 179 181 191 193 197 199
\\\hline	\end{array}
$$
\begin{itemize}
\item%\Remark 321 For
Indeed, for $\ell =0$ we get equation~\eqref{eq.3}, 
and from Proposition~\ref{prop321} the solution $\sol=5$, 
which is the first one given in the preceding Example~\ref{ex3}.
\item
%\Example 321a
For $\ell  = 1$, $2\,\ell +5 = 7$ is prime,
therefore $p=7$ is a solution of the equation $\sigma(x) = 3\,x - 3^{d(x)} - 4$.
\item
%\Example 321b
For $\,\ell  = 3\,$, $\,p=2\,\ell +5 = 11\,$ is prime; accordingly, 
$p=11$ is a solution to $\,\sigma(x) = 3\,x - 3^{d(x)} - 12\,$.
\end{itemize}

\Proposition 322
If\/ $\,k=3\,(2\,\ell +1)$\, and
$\,p = 2\,\ell +29\,$ is prime, then $\,\sol= 2\,p\,$ is a solution of~\eqref{eq32}.
%for the equation $\sigma(x) = 3\,x - 3^{d(x)} - 3(2m+1)\,$. 

\Proof
Again, $\sigma(\sol ) = \sigma(2\,p) = 3\,(p+1)
 = 3\,(2p) - 3^4 -3\,(p - 28) = 3\,\sol  - 3^{d(\sol )} - 3\,(2\,\ell +1)$. 

\Example 2a
For $\,\ell  = -5\,$, $\,p = 19\,$ is prime, and one can check that $2\cdot 19$ is indeed a solution to $\,\sigma(x) = 3\,x - 3^{d(x)} + 27\,$.

\Example 2b
For $\,\ell  = 1\,$, $\,p = 31\,$ is prime,  and $2\cdot 31$ is a solution to $\,\sigma(x) = 3\,x - 3^{d(x)} - 9\,$.



The following is a considerable generalization of the above Theorem~\ref{thm3}:

\Theorem 4.15.1
Let $p$ and $q$ be two distinct primes, and $t$  a nonnegative integer.
Then $x = p \,q^t$ is a solution for the equation~\eqref{eq32} % (4)  ?(x) = 3x - 3^d(x) - k 
iff  
$p = (k \,(q -1)+q^{t+1}-1+(q-1) 3^{2\,t+2}) / (2\, q^{t+1} -3\,q^t+1) $.


\Proof For $x = p\, q^t$, we have $3x - 3^{d(x)} - \sigma(x) = k \iff% <=>  
3\,p\, q^t - 3^{2\,t+2} - (p+1) (q^{t+1} -1)/(q -1) = k \iff
3 p q^t (q -1) - 3^{2 t+2} (q -1) - (p+1) (q^{t+1} -1) = k(q -1)  \iff
p (2 q^{t+1} - 3 q^t+1) = (k (q -1)+q^(t+1)-1+(q -1) 3^(2 t+2)) \iff
p = (k (q -1)+q^{t+1} -1+(q -1) 3^{2 t+2}) / (2 q^{t+1} - 3 q^t+1) $.
%
So $x = p q^t$ is a solution of the equation~\eqref{eq32} iff
$ p = (k (q -1)+q^{t+1}-1+(q -1) 3^{2 t+2}) / (2 q^{t+1} -3 q^t+1) $.







%\section{Some other results for similar equations}

\section{Results related to quadruply-perfect numbers}


Quadruply-perfect numbers $Q$ are such that $\sigma(Q) = 4\,Q$.
They are listed in sequence A027687. % of the \OEIS. 
There exist only 36 such numbers, which are all known since the early 20th century~\cite{flam}.

We consider first one ``deformed'' version of this defining equation, 
and then some other results related to quadruply-perfect numbers,
or, to relations of the form $\sigma(x)=4\,x-f(x)$.


%\subsection{Solutions to $ \sigma(x) = 4\,x - f(x) $}

\subsection{Solutions to $ \sigma(x) = 4\,x - C $}

As before, we first consider a constant additional term,
and recall that Theorem~\ref{thm1''} (with $k=4$) yields

\Corollary 32
If $Q$ is a quadruply-perfect number (A027687)
then the equation $$\, \sigma(x) = 4\,(x+Q) \,$$ has infinitely many solutions,
including all numbers of the form  $\sol = p\,Q$,
where $p$ is a prime which does not divide $Q$.

%\Proof
%This is a special case of Theorem~\ref{thm1''}, for $k=4$. 
%As seen from the proof of that Theorem, all numbers $\sol = p\,Q$, 
%where $p$ is a prime which does not divide $Q$,
%are solutions of the equation.

%% Because $\sigma(n) = \sigma(p\,Q) = \sigma(p)\,\sigma(Q)
%% = 4\,(p+1)\,Q = 4\,p\,Q+4\,Q = 4\,(n+Q)$.


%It is easily seen that a similar result holds for 
%equations $\sigma(x) = k\,(x+Q_k)$, where $Q_k$ is a $k$-perfect number.


A numerical search for solutions to the preceding equation reveals additional solutions, 
as $ x = 2^3 \cdot 3^3 \cdot 5 \cdot 7^2 \cdot 13$,
which are not yet described by previous theorems.
%
%
%If we know a solution $x$ not yet described by previous theorems, 
In such a case 
we can often, somehow systematically, construct a relation which
describes a family of solutions to which the given number $x$ belongs.
%
%
To this end, we consider (for example) one of the prime factors of $x$ as a parameter,
and express it in terms of the constant term occurring in the equation.
Then, whenever this expression yields a prime, coprime to the other
factors of $x$, we have again a solution.
%
%
In the case at hand, we can look for solutions of the form
$ x = 2^3 \cdot 3^3 \cdot 5 \cdot 7^2 \cdot p$, where $ p>7 $ is prime.
For such $x$, we find that $\, \sigma(x) = 4\,(x+m) \,$ 
is equivalent to $ 2^2\cdot 5\cdot 3^3\,(5\cdot 19-3\,p) = m $.
Otherwise stated,

\Proposition dec29b
If $p = (95 - m/540)/3$ is a prime greater than 7, %%% corr.6.1.10: 85>95
\ie, $m = 51300 - 1620\,p$, %%% added 11.1.10
then $ x = 2^3 \cdot 3^3 \cdot 5 \cdot 7^2 \cdot p$
is a solution for the equation $\sigma(x) = 4\,(x + m)$.

\Example dec29b
Considering primes $p>7$, this proposition yields a solution for the following values of $m$:
$$\begin{array}{r|c|c|}
  m~~~ &  p &  x     \\\hline
 33480 & 11 &  582120\\\hline
 30240 & 13 &  687960\\\hline
 23760 & 17 &  899640\\\hline
 20520 & 19 & 1005480\\\hline
 14040 & 23 & 1217160\\\hline
% 
  4320 & 29 & 1534680\\\hline
  1080 & 31 & 1640520\\\hline
 -8640 & 37 & 1958040\\\hline
-15120 & 41 & 2169720\\\hline
-18360 & 43 & 2275560\\\hline
\end{array}
\qquad
\begin{array}{c|c|c|}
   m   &  p &  x     \\\hline
-24840 & 47 & 2487240\\\hline
-34560 & 53 & 2804760\\\hline
-44280 & 59 & 3122280\\\hline
-47520 & 61 & 3228120\\\hline
-57240 & 67 & 3545640\\\hline
%
-63720 & 71 & 3757320\\\hline
-66960 & 73 & 3863160\\\hline
-76680 & 79 & 4180680\\\hline
-83160 & 83 & 4392360\\\hline
-92880 & 89 & 4709880\rlap{~ ~ ~ etc.}\\\hline
\end{array}
$$



%  v=Select[Range[-100000,33480],PrimeQ[(51300-#)/1620 ]&]
%  Table[{p=(51300-v[[k]])/1620;v[[k]],p,DivisorSigma[1,2^3 3^3 5 7^2 p ]==
%  4 (2^3 3^3 5 7^2 p+v[[k]]),2^3 3^3 5 7^2 p},{k,Length[v]}]

 
\pagebreak[3]

\subsection{Solutions to $\sigma(x) = 4\,x - k\,d(x) $}


%% For some $k$ we found %at most one solution
%% some solutions for the equation
Let us now consider the following equation for some particular $k\in\N$,
\begin{equation}
	\sigma(x) = 4\,x - k\,d(x) ~.		\label{eq33} %\label{5}\label{6}
%	\sigma(x) = 4\,x - 2\,k ~.		\label{eq33}
\end{equation}
%% as follows.

%Proposition 5.3 : A prime p is a solution for the equation (5) iff p = (2k + 1)/3.
%Please add the word " iff " in proposition 5.3.

\Proposition C1.  \label{prop5.3}%
A prime $p$ is solution to equation~\eqref{eq33} (with $d(x)=2$) if, and only if, $k=(3\,p-1)/2$.
Otherwise said, this equation has a prime as solution, if and only if $k\equiv1\pmod 3$ and $p=(2\,k+1)/3$ is prime.
%%If $\,k = 3\,m+1\,$ and $\,p = 2\,m+1\,$ is prime, then $p$ is a solution of equation~\eqref{eq33}.
%If $\,p = \frac13( 2\,k+1)\,$ is prime, then $x=p$ is a solution of equation~\eqref{eq33}
%.
%Conversely, a prime $p$ is a solution to this equation only if $3\,p = %\frac13(
% 2\,k+1\,$.

\Proof 
%Since $d(p) = 2$, w
%We have $\sigma(p) = \sigma(2\,m+1) = 2\,m+2 = 4\,(2\,m+1) - (3\,m+1)\,2 = 4\,p - 2\,k$.  
We have $\sigma(p) %= p+1 
= 4\,p-(3\,p-1)%\sigma( %\frac{2\,k+1}3+1 %= \frac13\,(2\,k+1)+1  %= \frac 43\,(2\,k+1) - 2\,k 
= 4\,p - 2\,\frac{3\,p-1}2
= 4\,p - d(p)\,k$.  
% We have s(p) = s(1/3*(2k + 1)) = 1/3*(2k + 1) + 1 = 4*1/3*(2k + 1) - 2k = 4p -2k.



%this is called "Example 28" by F.F.
%t=[;];for(k=1,99,2*k+1==Mod(0,3)|next;isprime((2*k+1)/3)|next; t=concat(t,[k;(2*k+1)/3]));t
\Example C1
For the following values of $k$ (non exhaustive list) 
we get a prime $p$ which is solution to~\eqref{eq33} according to the preceding Proposition:
$$
\begin{array}{*9{c|c|}}
k & 4 & 7 & 10 & 16 & 19 & 25 & 28 & 34 & 43 & 46 & 55 & 61 & 64 & 70 & 79 & 88 & 91 \\\hline 
p & 3 & 5 &  7 & 11 & 13 & 17 & 19 & 23 & 29 & 31 & 37 & 41 & 43 & 47 & 53 & 59 & 61 \\\hline
\end{array}
$$


\if0
~\vspace{-.5\baselineskip}
\begin{itemize}
\item For $ k = 4 $, the prime $ p = 3 $ is a solution of the equation $ \sigma(x) = 4\,x - 2\,d(x)$.%8 $.
\item For $ k = 7 $, the prime $ p = 5 $ is a solution of the equation $ \sigma(x) = 4\,x - 2\,d(x)$.%14 $.
\item%\Example C2	%For $\,m = 20\,$, 
	The prime $\,p=41\,$  is a solution of the equation $\sigma(x) = 4\,x - 2\,d(x)$.%\cdot 61$.%
\item%\Example C1	%For $\,m = 50\,$, %the only prime 
	The prime $\,p= 101\,$ is a solution for the equation $\sigma(x) = 4\,x - 2\,d(x)$.%\cdot 151$.%
\end{itemize}
\fi


The above proposition is actually a special case of the following one, 
similar to Theorem~\ref{thm4.15.1} (and with analogous proof):

\Theorem 4.15.2
Let $p$ and $q$ be two distinct primes and $t$ a nonnegative integer.
Then $x = p\, q^t$ is a solution for the equation~\eqref{eq33}
%(5)  ?(x) = 4x - k d(x)  
iff  
$p = (2\,k\,(q -1)(t+1)+q^{t+1} -1) / (3\,q^{t+1} - 4\,q^t+1)$.

\Example 4.15.2 
%~\\[-\baselineskip]
%\begin{itemize}\item
For $t = 0$, we get the earlier Proposition~\ref{prop5.3}.
%
For $ t = 1 $, we get the following 

%
%From this proposition as we mentioned before we obtain x = 41 is the only
%prime solution of the equation (6) :  ?(x) = 4x - 61d(x).

\Corollary 1:
Let  $p$  and  $q$ be two distinct primes, then $x = p\,q$ is a solution
for the equation~\eqref{eq33}  iff  $ p = (4\,k+q+1)/(3\,q -1) $.

\Example 1:
Take $q = 3$, then $3p$ is a solution iff $p = (k+1)/2$; 
thus for $k = 61$ we obtain $p = 31$ and the solution $x = 3\cdot 31 = 93$
of the equation
\begin{equation}\label{eq6}
	\sigma(x) = 4\,x - 61\,d(x).
\end{equation}
% is the second .



\Proposition 2: 
Let $p$ and $q$ be two distinct primes, and $t$ a nonnegative
integer. Then $x = 2^t\, p\, q$ is a solution for the equation~\eqref{eq33} %5
iff $p = (4\,k\,(t+1)+(q+1)(2^{t+1} -1)) / ((2^{t+1}+1)\,q -2^{t+1}+1)$.

\Corollary 2a:
We get that $ x = 2^t\,p\,q $ is a solution for the equation~\eqref{eq6} %{6}
iff $ p = (244\,(t+1)+(q+1)(2^{t+1} -1)) / ((2^{t+1}+1)\,q -2^{t+1}+1) $.

\Example 2b:
For $t = 0$, we get $ p = (244+q+1) / (3\,q -1)$, so $q$ should be less than 123 and we
have $ x = 3.31 = 93 $,  which is the only semiprime solution of the equation~\eqref{eq6}.
%(6)


\Example 2c: For $ t = 1$, we get $ p = (3q+491) / (5q -3) $, 
so $q$ should be less than 247 and we obtain as the only solution 
$ x = 2\cdot5\cdot23 = 230$.

\Example 2d:
The only other $t < 22$ with a corresponding solution is $t = 5$,
with $(p, q) = (3, 13)$. So $ x = 2^5\,3\cdot13 = 1248 $ is the largest solution of this form we know.


%***


\Proposition 3: 
Let $p$ and $ q$ be two distinct primes greater than 3, then
$x = 2^t\,3^2\,p\,q $ is a solution of the equation~\eqref{eq33} %{5} 
iff $p = (12\,k\,(t+1)+13(2^{t+1}-1)(q+1)) / (q(5\cdot 2^{t+1}+13) -13 (2^{t+1}-1))$.

So $x = 2^t\,3^2\,p\,q $ is a solution of the equation\eqref{eq6}
iff
$p = (13\,( 2^{1+t} -1) (1+q)+732\,(1+t))/((13 + 5\cdot 2^{1+ t})q -13\, (2^{t+1}-1))$.

\Example 3:
The only  number $t$ we know such that there is a corresponding
solution is $t=5$, with $ x = 2^5\,3^2\,5\cdot13 = 15840$.

% The preceding propositions explain all of the solutions
% $x\in\{$\,41, 93, 230, 1248, 15840\,$\}$,
% which are all solutions of the equation~\eqref{eq6} %{6} 
% which we know, up to $10^9$.
% And we obtained all of these numbers from the propositions .

There are no other solutions of the equation~\eqref{eq6} below $10^{10}$
than those described by one of the preceding propositions,
namely $x\in\{$\,41, 93, 230, 1248, 15840\,$\}$.


\subsection{Solutions to $ \sigma(x) = 5\,x - C $}


\Proposition B1
If $\,Q\,$ is a quadruply-perfect number, 
then $\, \sol= Q \,$ is a solution to the equation $\,\sigma(x) = 5\,x - Q\,$, 
and if 5 does not divide $\, Q \,$, then the equation has infinitely many solutions, 
including $\,\sol=5^{m}\,Q\,$, $\,m=0,1,2,3,...\,$. 

\Proof
This is Theorem~\ref{thmA} for $q=5$.


\Example B1
The quadruply-perfect numbers which are not divisible by 5 are:
$ Q_6 =$\linebreak[3] $142990848$, $Q_{11} = 403031236608$, $Q_{12} = 704575228896$, 
$Q_{13} = 181742883469056 $, and $Q_{16}, ..., Q_{36}$ except for $Q_{21}$, 
$Q_{26}$ and $Q_{28}$ (cf.\ OEIS~\cite{OEIS}, b-file for sequence 
\seqnum{A027687}).
Each of them gives rise to an infinite sequence of solutions to $\sigma(x) = 5\,x - Q$.


\if0
{A027687=[
/*1*/ 30240,/*2*/ 32760,/*3*/ 2178540,/*4*/ 23569920,/*5*/ 45532800,/*6*/ 142990848,
/*7*/ 1379454720,/*8*/ 43861478400,/*9*/ 66433720320,/*10*/ 153003540480,
/*11*/ 403031236608,/*12*/ 704575228896,/*13*/ 181742883469056,
/*14*/ 6088728021160320,/*15*/ 14942123276641920,/*16*/ 20158185857531904,
/*17*/ 275502900594021408,/*18*/ 622286506811515392,/*19*/ 71065075104190073088,
/*20*/ 203820700083634254643200,/*21*/ 63583020166602943198789632,
/*22*/ 156036748944739017459105792,/*23*/ 1612532860097932682386735104,
/*24*/ 3638193973609385308194865152,/*25*/ 24862223033124742964111030747136,
/*26*/ 27255271098894367673389500334080,/*27*/ 61013466228291299819132525346816,
/*28*/ 66886157385030640039109307924480,/*29*/ 630532357710420079508428362350592,
/*30*/ 1422606063264005633932239197700096,/*31*/ 1928622300236318049928258133164032,
/*32*/ 58234847911585743639191150258791907328,
/*33*/ 142911996309794733796329290979468115968,
/*34*/ 21571439852601139426707905057216142508032,
/*35*/ 651350717502447739281012140234441171379683328,
/*36*/ 1598455815964665104598224777343146075218771968]}
\fi


For $t=0$, the following theorem 
%can be considered as a generalization of the previous proposition,
%since it 
solves the same equation as the previous proposition;
in this case, however, it gives only one of the solutions found above.

\Theorem 33
If $Q$ is a quadruply-perfect number and $t\in\mathbb Z$, then the equation
$$\, \sigma(x) = 5\,x - (2t+1)\,Q \,$$
has $\sol = 5^{k-1}\,p\,Q$ as solution, whenever $p = 5^m+2\,t$ is prime,
with $m\in\N$ such that $ \gcd(5^{m-1}, p) = 1 $  (\ie, $p\ne5$ or $m=1$)
and $\gcd(5\,p,Q)=1$.


\if0
If $\,t\,$ is an integer and $\, m\in\mathbb N \,$ is such that $\,p = 5^m+2\,t\,$ is prime 
and $\,Q\,$ is a quadruply-perfect number such that $\gcd(5\,p,Q)=1\,$, 
then $\,\sol= 5^{m-1}\,p\,Q\,$ is a solution of the equation $\,\sigma(x) = 5\,x - (2t+1)\,Q \,$.

\fi


\Proof
This is Theorem~\ref{thmAA} with $q=5$.


% \Remark E0
% For $\,m=t=0\,$, we get $p=1$ which is not a prime, but this
% ``limiting case'' is actually just the preceding Proposition~\ref{propB1}.


\Example E1
For $\, t = -1 \,$, all numbers $\,m<2000\,$ such that \,$p = 5^m - 2$\, is prime, are: 
{\rm1, 2, 14, 26, 50, 126, 144, 260, 624} \,and\, $1424$ (\seqnum{A109080}).
From these we obtain 10 solutions 
$\,(5^1 -2)\,Q$, $5\,(5^2 - 2)\,Q$, ..., $5^{623}\,(5^{624} - 2)\,Q\,$ and 
$\,5^{1423}\,(5^{1424} - 2)\,Q\,$ for the equation $\,\sigma(x) = 5\,x + Q\,$.


\Example E2
For $\, t = 2 \,$, all numbers $m$ such that $\,m<2000\,$ and $\,5^m + 4\,$ is prime, are: 
{\rm 2, 6, 10, 102, 494, 794}\, and\, $1326$ (\seqnum{A124621}). So we obtain 6 solutions 
$5\,(5^2+4)\,Q$, $5^5\,(5^6+4)\,Q$, ..., $5^{793}\,(5^{794}+4)\,Q$\, and 
\,$5^{1325}\,(5^{1326}+4)\,Q$\, for the equation \,$\sigma(x) = 5\,(x - Q)$.




Finally, recall that from Theorem~\ref{thm(**)} we have for $q=5$:

\Proposition **5
If $Q$ is a quadruply perfect number not divisible by 5, then
$$\, \sigma(x) = 5\,(x+Q) \,$$
admits the solution $x=5^{k-1}\,p\,Q$ whenever $p=5^k-6$ is prime 
($k\in$ \seqnum{A165701}) 
and does not divide $Q$.


% t=1; A165701=vector(12,i,while(!ispseudoprime(5^t++-6),);t)
% t=1; Axxx=vector(12,i,while(!ispseudoprime(5^t++-6),);5^t-6)

\Example **5 \def\lb{\linebreak[3]}
For $k\in$ \seqnum{A165701} = (2, 4, 5, 6, 10, 53, 76, 82, 88, 242, 247,\lb 473, 586, 966, ...)
we get primes $p=5^k-6 \in$ (19, 619, 3119, 15619, 9765619,\lb
%11102230246251565404236316680908203119, 
%%% the line should not break here for the larger US Letter paper format
...) 
which lead to solutions $x=5^{k-1}\,p\,Q$ to $\sigma(x)=5\,(x+Q)$ 
for all quadruply perfect numbers not divisible by 5, listed in Example~\ref{exB1},
except for the case $k=2$ where $p=19$ divides 
the first two ($Q_6, Q_{11}$), the seventh ($Q_{18}$), and the last six
$(Q_{31},...,Q_{36})$ of these quadruply perfect numbers.
%
%The quadruply-perfect numbers which are not divisible by 5 are:
%$ Q_6 =$\linebreak[3] $142990848$, $Q_{11} = 403031236608$, $Q_{12} = 704575228896$, 
%$Q_{13} = 181742883469056 $, and $Q_{16}, ..., Q_{36}$ except for $Q_{21}$, 
%$Q_{26}$ and $Q_{28}$ (cf. OEIS~\cite{OEIS}, b-file for sequence A027687).
\\
The smallest example is therefore $x=5\cdot19\cdot142990848$, 
solution to $\sigma(x)=5\,(x+142990848)$.

\section{Acknowledgements}

The authors would like to thank the anonymous referee for his very careful 
reading of the manuscript and for making several valuable suggestions which 
led to a significant extension of the results.


\begin{thebibliography}{W}\makeatletter
\def\bi#1 #2: #3.{\bibitem{#1} {#2}, \textit{#3}.}% BOOK
%%% article for JIS:
\def\ai#1 #2: #3. #4 vol #5 {\bibitem{#1} {#2}, #3, \textit{#4} % journal title
	\textbf{#5} }
\def\z#1{#1\hskip\z@}
\def\http#1 {\texttt{http\@ifnextchar:{}{://}\hskip0pt#1} }%does not work as expected...

%\bi allenby R. B. J. T. Allenby {\rm and} E. J. Redfern: Introduction to Number Theory With Computing. Edward Arnold, Ltd., London, %1989, pp.~70, 74, 231. 

% refs for multiperfect numbers: %MPN
%\bi beiler A. H. Beiler: Recreations in the Theory of Numbers. Dover, NY, 1964, p.~22.

\bi dickson L. E. Dickson: History Of The Theory Of Numbers, Vol{.} I.  Carnegie Inst. of Washington, 1919, pp.~3--33, 38.

\bi Euclid Euclid: Elements, Book IX. Prop. 36. Available at \\
\href{http://wikipedia.org/wiki/File:Euclid-Elements.pdf}{\tt http://wikipedia.org/wiki/File:Euclid-Elements.pdf}.
English translation at \\
\href{http://aleph0.clarku.edu/~djoyce/java/elements/bookIX/propIX36.html}{\tt http://aleph0.clarku.edu/\char'176djoyce/java/elements/bookIX/propIX36.html} .

\ai EulerPerfect L. Euler: Tractatus de numerorum doctrina capita sedecim quae supersunt. Commentationes arithmeticae vol 2, 1849, pp.~503--575, reprinted in Opera Omnia Series~I, vol.~5, p.~182--283. 
Available at \href{http://www.EulerArchive.org/}{\tt http://www.EulerArchive.org/}.

\bi flam A. Flammenkamp: The Multiply Perfect Numbers Page.  Available at \\
\href{http://wwwhomes.uni-bielefeld.de/achim/mpn.html}{\tt http://wwwhomes.uni-bielefeld.de/achim/mpn.html} .

\ai desires R. K. Guy: Divisors and desires. Amer. Math. Monthly vol 104 (1997), 359--360.

%\bi upint R. K. Guy: Unsolved Problems in Number Theory. Third Edition, Springer-Verlag, 2004, sections B1, B2. 

\bi Koninck J.-M. De Koninck: Ces Nombres qui Nous Fascinent. %Entry 196, pp 58, 
	Ellipses, Paris 2008.
English translation ``Those Fascinating Numbers'' published by 
Amer. Math. Soc., 2009.

%% \bi pnr P. Ribenboim: The Book of Prime Number Records. Second Edition, Springer-Verlag, 1989, p.~81, p.~149.

%% \bi lbbp P. Ribenboim: The Little Book of Big Primes. Springer, 1991, pp.~83--87.

%% \bi riesel Hans Riesel: Prime Numbers and Computer Methods For Factorization.
%% Progress in Mathematics, vol. 57, Birkh\"auser, 1985, p.~127.

%MPN
\bi roberts J. Roberts: Lure of the Integers. Math. Assoc. America, 1992, p.~176.

%\bi rosen K. H. Rosen: Elementary Number Theory And Its Applications.
% Second Edition, Addison--Wesley, 1992, p.~199.

\bi OEIS N. J. A. Sloane: The On-line Encyclopedia of Integer Sequences. 
Available at \href{http://www.research.att.com/~njas/sequences/}{\tt http://www.research.att.com/\char'176njas/sequences/}.

\bi stew I. Stewart: L'Univers des Nombres, ``Les nombres multiparfaits''. Belin--Pour La Science, Paris, 2000. Chapter 15, pp.~82--88.

\bi wells D. Wells: The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, 1987, pp.~135--136.

\ai zhang Ming Zhi Zhang: A note on the equation $\phi(n)+\sigma(n)=3\,n$. 
Sichuan Daxue Xuebao vol 37 (2000), 39--40; MR1755990 (2001a:11009). 

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2000 {\it Mathematics Subject Classification}:
Primary 11A25; Secondary 11D99.

\noindent \emph{Keywords: } Sum of divisors function,
multiply perfect number, Diophantine equation involving arithmetic functions,
integer sequence.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000043},
\seqnum{A000203},
\seqnum{A000217},
\seqnum{A000396},
\seqnum{A000668},
\seqnum{A003307},
\seqnum{A005820},
\seqnum{A006516},
\seqnum{A007539},
\seqnum{A007691},
\seqnum{A011251},
\seqnum{A014224},
\seqnum{A027687},
\seqnum{A046060},
\seqnum{A046061},
\seqnum{A051783},
\seqnum{A058959},
\seqnum{A068390},
\seqnum{A082730},
\seqnum{A082731},
\seqnum{A096502},
\seqnum{A096818},
\seqnum{A096821},
\seqnum{A097215},
\seqnum{A098855},
\seqnum{A101260},
\seqnum{A109080},
\seqnum{A109321},
\seqnum{A110082},
\seqnum{A111592},
\seqnum{A124621},
\seqnum{A140863},
\seqnum{A141545},
\seqnum{A156555}, and
\seqnum{A165701}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 31 2009;
revised version received  February 18 2010.
Published in {\it Journal of Integer Sequences}, February 23 2010.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

