<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\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}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\begin{document}

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

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf 
On a Conjecture of Farhi
}
\vskip 1cm
\large
Soufiane Mezroui, Abdelmalek Azizi, and M'hammed Ziane \\
Laboratoire ACSA\\
D\'epartement de Math\'ematiques et Informatique\\
Universit\'e Mohammed Premier\\
Oujda 60000\\
Morocco\\
\href{mailto:mezroui.soufiane@yahoo.fr}{\tt mezroui.soufiane@yahoo.fr}\\
\href{mailto:abdelmalekazizi@yahoo.fr}{\tt abdelmalekazizi@yahoo.fr}\\
\href{mailto:ziane12001@yahoo.fr}{\tt ziane12001@yahoo.fr}  \\
\end{center}

\vskip .2 in




\begin{abstract}
Recently, Farhi showed that every natural number $N\not\equiv 2$ (mod 24)
can be written as the sum of three numbers of
the form $\left\lfloor\frac{n^{2}}{3}\right\rfloor\;\;
(n\in\mathbb{N})$. He conjectured that this result remains true even if
$N\equiv 2$ (mod 24). In this note, we prove this
statement.

\end{abstract}

\section{Introduction}

Throughout this note, we let $\mathbb{N}$ and $\mathbb{Z}$,
respectively, denote the set of the non-negative integers and the set
of the integers. We let $\lfloor \cdot \rfloor$ and $\langle \cdot \rangle$ denote
the integer-part and the fractional-part functions. Let $X$ be a set.
We denote the cardinality of $X$ by $\#X$. We also recall that
${\cdot}\overwithdelims()\cdot$
is the Jacobi symbol.

Recently, Farhi~\cite{far} showed that every natural number
$N\not\equiv 2$ (mod 24) can be written as the sum of three
numbers of the form $\left\lfloor\frac{n^{2}}{3}\right\rfloor\;\;
(n\in\mathbb{N})$. He conjectured that this result remains true even if
$N\equiv 2$ (mod 24). We recall his conjecture.

\begin{conjecture}
\label{co1}
Every natural number can be written as the sum of three numbers of the form $\left\lfloor\frac{n^{2}}{3}\right\rfloor\;\; (n\in\mathbb{N})$. 
\end{conjecture}

In fact, he proposed a more general conjecture.

\begin{conjecture}
Let $k\geq 2$ be an integer. There then exists a positive integer
$a(k)$ that satisfies the following property: every natural number can
be written as the sum of $k+1$ numbers of the form
$\left\lfloor\frac{n^{k}}{a(k)}\right\rfloor\;\; (n\in\mathbb{N})$.
\end{conjecture}

In this note, we prove Conjecture~\ref{co1}.

\section{Proof of Conjecture~\ref{co1}}

We recall Legendre's theorem~\cite[pp.\ 331--339]{leg}, which is a
necessary tool for our proof:

\begin{theorem}
Every natural number not of the form $4^{h}(8k+7)(h, k\in\mathbb{N})$ can be represented as the sum of three squares of natural numbers. 
\end{theorem}

We note that since $4^{h}(8k+7)$ is congruent to $0, 4$ or $7$ modulo
$8$, every natural number not congruent to $0, 4$ or $7$ modulo $8$ can
be represented as the sum of three squares of natural numbers. We will
use this result later.

Let $r_{3}(n)$ be the number of representations of the positive integer
$n$ as the sum of three squares of integers. The following theorem
provides an interesting formula for $r_{3}(n)$, which can be proven
using the theory of modular functions.

\begin{theorem}[see~\cite{bat}]
For any positive integer $n$, we have
\begin{equation*}
r_{3}(n)=\frac{16}{\pi}\sqrt{n}\chi_{2}(n)K(-4n)\prod_{p^{2}\mid n}\left( 1+\frac{1}{p}+\cdots+\frac{1}{p^{b-1}}+\frac{1}{p^{b}}\left(1-\left(\frac{-p^{-2b}n}{p}\right)\frac{1}{p}\right)^{-1} \right),
\end{equation*}
where $b=b(p)$ is the largest integer such that $p^{2b}\mid n$,
\begin{equation*}
K(-4n)=\sum_{m=1}^{\infty}\left(\frac{-4n}{m}\right)\frac{1}{m},
\end{equation*}
and if $4^{a}$ is the highest power of $4$ dividing $n$, then
\begin{displaymath}
\chi_{2}(n)=
\begin{cases}
0, &amp; \text{if $4^{-a}n\equiv 7$ {\rm (mod 8);}}\\
\frac{1}{2^{a}}, &amp; \text{if $4^{-a}n\equiv 3$ {\rm (mod 8);}}\\
\frac{3}{2^{a+1}}, &amp; \text{if $4^{-a}n\equiv 1, 2, 5, 6$ {\rm (mod 8).}}
\end{cases}
\end{displaymath}
\begin{flushright}
$\Box$
\end{flushright}
\end{theorem}

We will require the following technical lemma.

\begin{lemma}
\label{lem}
For any positive integer $n\equiv 1$ {\rm (mod 8)}, we have 
$$
r_{3}(9n)&gt; \frac{3}{2}\; r_{3}(n).
$$
\end{lemma}

\begin{proof}
We have 
\begin{equation*}
\begin{split}
r_{3}(9n)=&amp;\frac{16}{\pi}\sqrt{9 n}\chi_{2}(9 n)K(-36 n)\times \\
\prod_{p^{2}\mid 9 n}\left(1+\frac{1}{p}+\cdots+\frac{1}{p^{b^{'}-1}}\right.
&amp;\left.+\frac{1}{p^{b^{'}}}\left(1-\left(\frac{-9\;p^{-2 b^{'}} n}{p}\right)\frac{1}{p}\right)^{-1}\right),
\end{split}
\end{equation*}
where $b^{'}=b^{'}(p)$ denotes the largest integer for which $p^{2 b^{'}}\mid 9 n$. Since $n\equiv 1\,(\mathrm{mod}\,8)$, it follows that $4^{0}=1$ is the highest power of $4$ dividing $n$. This result implies that $\chi_{2}(n)=\frac{3}{2}$. Similarly, we have $9n\equiv 1\,(\mathrm{mod}\,8)$. Thus, $4^{0}=1$ is the highest power of $4$ dividing $9 n$, which gives $\chi_{2}(9 n)=\chi_{2}(n)=\frac{3}{2}$. Conversely, it follows from~\cite[p.\ 84]{bat} that
\begin{equation*}
K(-36 n)=K(-4\times 3^{2}\times n)=\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)K(-4 n).
\end{equation*}

Since $n\equiv 1$ (mod 8),
it follows from Legendre's theorem that $n$ can be represented as the sum of three squares of natural numbers. Thus, $r_{3}(n)\neq 0$. Dividing through by $r_{3}(n)$ then yields an identity equivalent to
\begin{equation*}
\frac{r_{3}(9 n)}{r_{3}(n)}=
\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \frac{\prod_{p^{2}\mid 9 n}\left( 1+\frac{1}{p}+\cdots+\frac{1}{p^{b^{'}-1}}+\frac{1}{p^{b^{'}}}\left(1-\left(\frac{-9\;p^{-2 b^{'}} n}{p}\right)\frac{1}{p}\right)^{-1} \right)}{\prod_{p^{2}\mid n}\left( 1+\frac{1}{p}+\cdots+\frac{1}{p^{b-1}}+\frac{1}{p^{b}}\left(1-\left(\frac{-p^{-2b}n}{p}\right)\frac{1}{p}\right)^{-1} \right)}
\cdot
\end{equation*}
Let $p\neq 3$ with $p^{2}\mid n$. Thus, $b^{'}=b^{'}(p)$ is the largest integer for which $p^{2 b^{'}}\mid n$. Therefore, one obtains  $b^{'}=b^{'}(p)=b(p)=b$. Furthermore, we have 
\begin{equation*}
\left(\frac{-9\;p^{-2 b^{'}} n}{p}\right)=\left(\frac{3^{2}}{p}\right)\left(\frac{- p^{-2 b^{'}} n}{p}\right)=\left(\frac{- p^{-2 b^{'}} n}{p}\right)=\left(\frac{- p^{-2 b} n}{p}\right)\cdot
\end{equation*}
For every $p\neq 3$ with $p^{2}\mid n$, we then have
$
1+\frac{1}{p}+\cdots+\frac{1}{p^{b^{'}-1}}+\frac{1}{p^{b^{'}}}\left(1-\left(\frac{-9\;p^{-2 b^{'}} n}{p}\right)\frac{1}{p}\right)^{-1} =1+\frac{1}{p}+\cdots+\frac{1}{p^{b-1}}+\frac{1}{p^{b}}\left(1-\left(\frac{-p^{-2b}n}{p}\right)\frac{1}{p}\right)^{-1}.
$
Thus, two cases are evident: if $3^{2}\mid n$, then
\begin{equation*}
\frac{r_{3}(9 n)}{r_{3}(n)}=\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \frac{1+\frac{1}{3}+\cdots+\frac{1}{3^{b^{'}-1}}+\frac{1}{3^{b^{'}}}\left(1-\left(\frac{-9\times  3^{-2 b^{'}} n}{3}\right)\frac{1}{3}\right)^{-1}}{1+\frac{1}{3}+\cdots+\frac{1}{3^{b-1}}+\frac{1}{3^{b}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}},
\end{equation*}
Otherwise, $3^{2}$ does not divide $n$, so 
\begin{equation*}
\displaystyle{\frac{r_{3}(9 n)}{r_{3}(n)}=\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \left( 1+\cdots+\frac{1}{3^{b^{'}-1}}+\frac{1}{3^{b^{'}}}\left(1-\left(\frac{-9\times  3^{-2 b^{'}} n}{3}\right)\frac{1}{3}\right)^{-1}\right)}.
\end{equation*}
We now show that in all cases, $r_{3}(9 n)&gt;\frac{3}{2}\;r_{3}(n)$.
\begin{itemize}
\item If $3^{2}$ does not divide $n$, $b^{'}=b^{'}(3)=1$ is implied to be the largest integer for which $3^{2 b^{'}}\mid 9 n$. One obtains
\begin{equation*}
\frac{r_{3}(9 n)}{r_{3}(n)}=\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \left( 1+\frac{1}{3}\left(1-\left(\frac{-n}{3}\right)\frac{1}{3}\right)^{-1}\right).
\end{equation*}
We have $\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)=1, \frac{2}{3}$ or $\frac{4}{3}$ and so $\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}&gt;\frac{3}{2}$, which gives the result 
$r_{3}(9 n)&gt;\frac{3}{2}\;r_{3}(n)$.

\item If $3^{2}\mid n$, then $b$ (respectively $b^{'}$) is the largest integer for which $3^{2b}\mid n$ (respectively $3^{2b^{'}}\mid 9 n$). Hence,
\begin{equation*}
\begin{split}
\frac{r_{3}(9 n)}{r_{3}(n)}&amp;=\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \frac{ 1+\frac{1}{3}+\cdots+\frac{1}{3^{b}}+\frac{1}{3^{b+1}}\left(1-\left(\frac{-9\times  3^{-2 (b+1)} n}{3}\right)\frac{1}{3}\right)^{-1}}{1+\frac{1}{3}+\cdots+\frac{1}{3^{b-1}}+\frac{1}{3^{b}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}}\\
&amp;=\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}\times \frac{1+\frac{1}{3}+\cdots+\frac{1}{3^{b}}+\frac{1}{3^{b+1}}\left(1-\left(\frac{-3^{-2 b} n}{3}\right)\frac{1}{3}\right)^{-1}}{1+\frac{1}{3}+\cdots+\frac{1}{3^{b-1}}+\frac{1}{3^{b}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}}\cdot\\
\end{split}
\end{equation*}
We have $\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)= 1, \frac{2}{3}$ or $\frac{4}{3}$. One obtains the following in all cases:  
\begin{equation*}
\frac{1}{3^{b}}+\frac{1}{3^{b+1}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}\geq \frac{1}{3^{b}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}.
\end{equation*}
This result implies 
$
1+\frac{1}{3}+\cdots+\frac{1}{3^{b}}+\frac{1}{3^{b+1}}\left(1-\left(\frac{-3^{-2 b} n}{3}\right)\frac{1}{3}\right)^{-1}\geq 
1+\frac{1}{3}+\cdots+\frac{1}{3^{b-1}}+\frac{1}{3^{b}}\left(1-\left(\frac{-3^{-2b}n}{3}\right)\frac{1}{3}\right)^{-1}.
$
Conversely, $\frac{3}{\left(1-\left(\frac{-4 n}{3}\right)\frac{1}{3}\right)^{-1}}&gt;\frac{3}{2}$. Thus, we obtain the desired result, $r_{3}(9 n)&gt; \frac{3}{2}\; r_{3}(n)$.
\end{itemize}
\end{proof}

\begin{theorem}
Every natural number $N\equiv 2$ 
{\rm (mod 24)} can be written as the sum of three numbers of the form $\left\lfloor\frac{n^{2}}{3}\right\rfloor\;(n\in\mathbb{N})$.
\end{theorem}

\begin{proof}
We may write $N=2+24 k$ with $k\in\mathbb{N}$. Thus, $3N+3=9(1+ 8 k)$. We now define two sets $S_{1}$ and $S_{2}$ as follows:
\begin{align*}
S_{1}&amp;=\Bigl\{(a,b,c)\in\mathbb{Z}^{3}: a^{2}+b^{2}+c^{2}=1+8 k\Bigr\},\\
S_{2}&amp;=\Bigl\{(a,b,c)\in\mathbb{Z}^{3}: a^{2}+b^{2}+c^{2}=9(1+8 k)\Bigr\}.
\end{align*}

By the definition of $r_{3}$, we have $\# S_{2}=r_{3}(9(1+8 k))$ and $\# S_{1}=r_{3}(1+8 k)$. Since $1+8 k\equiv 1\,(\mathrm{mod}\,8)$, we apply Lemma~\ref{lem} to obtain $r_{3}(9(1+8 k))&gt; \frac{3}{2}\;r_{3}(1+8 k)\geq r_{3}(1+8 k)$. 
One obtains $r_{3}(9(1+8 k))&gt;r_{3}(1+8 k)$, which is equivalent to $\# S_{2}&gt;\# S_{1}$. We note that this last result is the 
key to the proof. Let us define the map
$$
\begin{array}{llll}
f:&amp;S_{1}&amp;\longrightarrow &amp;S_{2}\\
&amp;(a,b,c)&amp;\longmapsto&amp;(3 a,3 b,3 c).\\
\end{array}
$$ 
We see easily that $f$ is well defined and injective. Since $\#
S_{2}&gt;\# S_{1}$, we can find $(a,b,c)\in S_{2}$ such that
$(a,b,c)\notin f(S_{1})$. Furthermore, we have $a^{2}+b^{2}+c^{2}=9(1+8
k)\equiv 0$ (mod 3), then either $a^{2}\equiv b^{2}\equiv
c^{2}\equiv 1$ (mod 3) or $a^{2}\equiv b^{2}\equiv
c^{2}\equiv 0$ (mod 3). The last case cannot hold because
one of the elements, $a$, $b$ and $c$, is not divisible by
$3\;((a,b,c)\notin f(S_{1}))$. Thus, $a^{2}\equiv b^{2}\equiv
c^{2}\equiv 1 $ (mod 3) and we have

\begin{equation*}
\begin{split}
N+1&amp;=3(1+8 k)\\
&amp;=\displaystyle{\frac{a^{2}}{3}+\frac{b^{2}}{3}+\frac{c^{2}}{3}}\\
&amp;=\displaystyle{\left\lfloor\frac{a^{2}}{3}\right\rfloor+\left\lfloor\frac{b^{2}}{3}\right\rfloor+\left\lfloor\frac{c^{2}}{3}\right\rfloor+\left\langle\frac{a^{2}}{3}\right\rangle+\left\langle\frac{b^{2}}{3}\right\rangle+\left\langle\frac{c^{2}}{3}\right\rangle}.
\end{split}
\end{equation*}
Since $a^{2}\equiv b^{2}\equiv c^{2}\equiv 1\,(\mathrm{mod}\,3)$, then $\displaystyle{\left\langle\frac{a^{2}}{3}\right\rangle+\left\langle\frac{b^{2}}{3}\right\rangle+\left\langle\frac{c^{2}}{3}\right\rangle=\frac{1}{3}+\frac{1}{3}+\frac{1}{3}=1}$, which gives $N=\displaystyle{\left\lfloor\frac{a^{2}}{3}\right\rfloor+\left\lfloor\frac{b^{2}}{3}\right\rfloor+\left\lfloor\frac{c^{2}}{3}\right\rfloor}$. We replace $(a,b,c)\in\mathbb{Z}^{3}$ by $(|a|, |b|, |c|)\in\mathbb{N}^{3}$ to obtain the desired solution. The conjecture is proven.
\end{proof}

\section{Acknowledgments}
The authors would like to thank the editor and the anonymous reader for their invaluable comments.

This work was supported by Acad\'emie Hassan 2 under the project ``Math\'ematiques et Applications: cryptographie'' and URAC6-CNRST.

\begin{thebibliography}{9}

\bibitem{far} 
B. Farhi,  On the representation of the natural numbers as the sum of
three terms of the sequence $\lfloor\frac{n^{2}}{a}\rfloor$, {\it J.
Integer Seq.} {\bf 16} (2013),
\href{https://cs.uwaterloo.ca/journals/JIS/VOL16/Farhi/farhi7.html}{Article
13.6.4}.

\bibitem{bat} 
P. T. Bateman, On the representation of a number as the sum of three
squares, {\it Trans. Amer. Math. Soc.} {\bf 71} (1951), 70--101.

\bibitem{leg} 
A. M. Legendre, {\it Th\'eorie des Nombres}, 3rd ed., Vol.\ 2, 1830.

\end{thebibliography}





\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11B13.

\noindent \emph{Keywords: }
additive base, Legendre's theorem,
representation of an integer as the sum of three squares.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 25 2013;
revised versions received July 31 2013; November 22 2013; 
December 30 2013.
Published in {\it Journal of Integer Sequences}, December 30 2013.
Revision, January 3 2014.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

</pre></body></html>