<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 
Representation of Integers Using $a^2+b^2-dc^2$
}
\vskip 1cm
\large
Peter Cho-Ho Lam\\
Department of Mathematics\\
Simon Fraser University\\
Burnaby, BC  V5A1S6\\
Canada \\
\href{mailto:chohol@sfu.ca}{\tt chohol@sfu.ca}\\
\end{center}

\vskip .2in

\begin{abstract}
A positive integer $d$ is called \textit{special} if every integer $m$
can be expressed as $a^2+b^2-dc^2$ for some nonzero integers $a,b,c$. A
necessary condition for special numbers was recently
given by Nowicki, and in
this paper we prove its sufficiency. Thus, we give a complete
characterization for special numbers.
\end{abstract}


\section{Introduction}
Many problems in number theory are concerned with the representation of integers by multivariate polynomials with integral coefficients and variables. For example, the well-known theorem of Lagrange asserts that every positive integer is the sum of four squares. Ramanujan \cite{R} gave a complete list of general quadratic forms with four variables,
\begin{equation*}
Q(x,y,z,w)=ax^2+by^2+cz^2+dw^2,
\end{equation*}
that represent all positive integers, where $a,b,c,d\in\mathbb{N}$. Note that it is not possible to represent all positive integers if we reduce one variable in $Q(x,y,z,w)$; in fact, it cannot even represent all integers from 1 to 10 by a very elementary argument. However, three variables are sufficient if we use indefinite quadratic forms. For example, the form $Q(x,y,z)=x^2+y^2-z^2$ can represent all integers with integral $x,y,z$ since $x^2-z^2$ represents all odd integers and one can pick $y=0,1$. To generalize this, Nowicki \cite{NA} defined special numbers and proved a necessary condition for them, which is stated in Theorem \ref{main}:
\begin{definition}
A positive integer $d$ is {\it special\/} if for every integer $m$ there exist nonzero integers $a,b,c$ such that $m=a^2+b^2-dc^2$.
\end{definition}
\begin{theorem}
\label{main}
Every special number $d$ is of the form $q$ or $2q$, where either $q=1$ or $q$ is a product of primes of the form $4m+1$.
\end{theorem}
Nowicki \cite{NA} further verified that the converse is true when $d\le50$ through various identities. For example, when $d=13$, we have
\begin{equation*}
\begin{split}
(2k-4)^2+(3k-10)^2-13(k-3)^2=(2k-30)^2+(3k-36)^2-13(k-13)^2&amp;=2k-1,\\
(2k-3)^2+(3k-2)^2-13(k-1)^2=(2k-29)^2+(3k-54)^2-13(k-17)^2&amp;=2k.
\end{split}
\end{equation*}
We need two identities for each parity since we require $a,b,c$ to be nonzero. Similarly, when $d=34$, we have
\begin{equation*}
\begin{split}
(3k-7)^2+(5k-16)^2-34(k-3)^2=(3k-24)^2+(5k-33)^2-34(k-7)^2&amp;=2k-1,\\
(3k-11)^2+(5k-27)^2-34(k-5)^2=(3k-45)^2+(5k-61)^2-34(k-13)^2&amp;=4k,\\
(3k-1)^2+(5k+1)^2-34(k)^2=(3k-69)^2+(5k-135)^2-34(k-26)^2&amp;=4k+2.
\end{split}
\end{equation*}
In this paper, we prove the converse of Theorem \ref{main}, and hence give a complete characterization of special numbers:
\begin{theorem}
\label{main2}
If $d$ is of the form $q$ or $2q$, where either $q=1$ or $q$ is a product of primes of the form $4m+1$, then $d$ is special.
\end{theorem}

\section{Proof of Theorem \ref{main2}}
First, we invoke the following well-known lemma, where the proof is given in \cite[Theorem 3.20]{NZM}:
\begin{lemma}
\label{lemma1}
A positive integer $n$ can be expressed as the form $q$ or $2q$ where $q$ is a product of primes of the form $4m+1$ if and only if $n$ can be expressed as the form $n=x^2+y^2$ where $x,y\in\mathbb{N}$ and $\gcd(x,y)=1$.
\end{lemma}
\begin{proof}[Proof of Theorem \ref{main2}]
In what follows, we assume $d&gt;1$, since $d=1$ is already known to be special.

Suppose $d$ is odd. Then all prime factors of $d$ are of the form $4m+1$. By Lemma \ref{lemma1}, we can write $d=x^2+y^2$ where $\gcd(x,y)=1$, and $x\not\equiv y$ (mod 2). Now let $a=xk+\alpha, b=yk+\beta$ and $c=k$, where $\alpha$ and $\beta$ are integers which will be chosen later. It follows that
\begin{eqnarray}
\begin{aligned}
\label{ide}
a^2+b^2-dc^2&amp;=(xk+\alpha)^2+(yk+\beta)^2-(x^2+y^2)(k)^2 \\
&amp;=2(x\alpha+y\beta)k+\alpha^2+\beta^2.
\end{aligned}
\end{eqnarray}

We consider the solution pairs $(\alpha, \beta)$ to the equation 
\begin{equation}
\label{eqn1}
x\alpha+y\beta=1.
\end{equation}
It suffices to show that $\alpha^2+\beta^2$ cover both parities. Note that \eqref{eqn1} must have an integral solution $(\alpha_0, \beta_0)$ since $\gcd(x,y)=1$. If we define $\alpha_1=\alpha_0+y$ and $\beta_1=\beta_0-x$, then $(\alpha_1, \beta_1)$ is another solution of \eqref{eqn1}. Now observe
\begin{eqnarray*}
\alpha_1^2+\beta_1^2&amp;=&amp;(\alpha_0+y)^2+(\beta_0-x)^2\\
&amp;=&amp;(\alpha_0^2+\beta_0^2)+x^2+y^2+2(\alpha_0y+\beta_0x)\\
&amp;\equiv&amp;(\alpha_0^2+\beta_0^2)+x^2+y^2\pmod 2.
\end{eqnarray*}
Since $x^2+y^2=d$ is odd, $\alpha_0^2+\beta_0^2\not\equiv\alpha_1^2+\beta_1^2$ (mod 2). The two identities given by 
\begin{equation*}
(xk+\alpha_i)^2+(yk+\beta_i)^2-(x^2+y^2)(k)^2=2k+\alpha_i^2+\beta_i^2,
\end{equation*}
where $i=0,1$, cover both odd and even integers, and hence every integer can be expressed as the form $a^2+b^2-dc^2$ for some integers $a,b,c$.

However, one of the variables $a,b,c$ becomes zero in the representations of
\begin{equation}
\label{1ide}
m=\alpha_i^2+\beta_i^2, -\frac{2\alpha_i}{x}+\alpha_i^2+\beta_i^2, -\frac{2\beta_i}{y}+\alpha_i^2+\beta_i^2
\end{equation}
for $i=0,1$. To fix this problem, we can simply set $\alpha_n=\alpha_0+ny$ and $\beta_n=\beta_0-nx$ to generate more identities, where $n\in\mathbb{N}$. As $n\rightarrow\infty$, the absolute values of $\alpha_n$ and $\beta_n$ approach infinity. Thus for sufficiently large $n$, the new exceptional cases do not overlap with the original ones, and the values in \eqref{1ide} can be represented using the new identities.

Now suppose $d$ is even. Then $d=2q$ where $q$ is a product of primes of the form $4m+1$. Again by Lemma \ref{lemma1}, we can write $d=x^2+y^2$ where $\gcd(x,y)=1$, but this time $x\equiv y\equiv1$ (mod 2). We have a similar expansion as \eqref{ide}, and if $x\alpha+y\beta=1$, then $\alpha\not\equiv\beta$ (mod 2) and $\alpha^2+\beta^2\equiv1$ (mod 2). Therefore we have an identity that generates all odd integers.

But in this case, shifting the solution $(\alpha, \beta)$ of \eqref{eqn1} does
not produce an identity for even integers. Therefore in \eqref{ide} we consider the linear equation
\begin{equation}
\label{eqn2}
x\alpha+y\beta=2.
\end{equation}
Now we pick a pair of solution $(\alpha_0, \beta_0)$, and construct the second solution pair $(\alpha_1, \beta_1)$ in a similar manner, and then
\begin{eqnarray*}
\alpha_1^2+\beta_1^2&amp;=&amp;(\alpha_0+y)^2+(\beta_0-x)^2\\
&amp;=&amp;(\alpha_0^2+\beta_0^2)+x^2+y^2+2(\alpha_0y+\beta_0x)\\
&amp;\equiv&amp;(\alpha_0^2+\beta_0^2)+2+2(\alpha_0y+\beta_0x)\pmod 4.
\end{eqnarray*}
Since $x$ and $y$ are odd, and the right hand side of \eqref{eqn2} is even, we deduce that $\alpha_0\equiv\beta_0$ (mod 2). Therefore $2\mid (\alpha_0y+\beta_0x)$ and
\begin{equation*}
\alpha_1^2+\beta_1^2
\equiv\alpha_0^2+\beta_0^2+2\pmod 4.
\end{equation*}
Also note that $\alpha_0^2+\beta_0^2\equiv0$ (mod 2). Thus, the two identities given by
\begin{equation*}
(xk+\alpha_i)^2+(yk+\beta_i)^2-(x^2+y^2)(k)^2=2k+\alpha_i^2+\beta_i^2,
\end{equation*}
where $i=0,1$, cover both integers of the form $4m$ and $4m+2$, and hence every integer can be expressed as the form $a^2+b^2-dc^2$ for some integers $a,b,c$. The exceptional cases can be handled similarly as in the $d=q$ case.
\end{proof}


\begin{thebibliography}{3}

\bibitem{NZM}I. Niven, H. S. Zuckerman, and H. L. Montgomery,
{\it An Introduction to the Theory of Numbers}, John Wiley \&amp; Sons, Inc., 1991.

\bibitem{NA}A. Nowicki,
The numbers {$a^2+b^2-dc^2$}, {\it J. Integer Seq.} {\bf 18} (2015),
\href{https://cs.uwaterloo.ca/journals/JIS/VOL18/Nowicki/nowicki3.html}{Article 15.2.3}.

\bibitem{R}S. Ramanujan,
On the expression of a number in the form {$ax^2+by^2+cz^2+dw^2$}, {\it Proc. Cambridge Philos. Soc.} {\bf 19} (1917), 11--21. Reprinted in
{\it Collected Papers of Srinivasa Ramanujan}, AMS Chelsea
Publishing, 2000, pp.\ 169--178.


\end{thebibliography}

\bigskip
\hrule
\bigskip

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

\noindent \emph{Keywords: } 
sum of squares, sum of two coprime squares.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 14 2015;
revised version received  July 29 2015.
Published in {\it Journal of Integer Sequences}, July 29 2015.

\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>