1$. Then there is an odd number $x\in\Z^+$ such that $x^2\eq 2r\ (\mo\ m)$. (Note that if $x$ is even then $x+m$ is odd.) Thus $2r=x^2+mq$ for some odd integer $q$. As $(x,m)=1=(m,2^{a+1})$, by the Chinese Remainder Theorem, for some integer $b\gs |q|$ we have both $bx\eq q\ (\mo\ m)$ and $2x+bm\eq-1\ (\mo\ 2^{a+1})$. Note that $b$ is odd since $bm\eq-1\ (\mo\ 2)$. For $k\in\N$ we set \begin{equation}b_k=b+2^{a+1}km\quad\t{and}\quad n_k=\f{b_kx-q}{2m}+\f{b_k^2-1}8\in\N. \end{equation} Then $$(8n_k+1)m^2+8r=\l(b_k^2+4\f{b_kx-q}m\r)m^2+4(x^2+mq)=(2x+b_km)^2.$$ For every $k=1,2,3,\ldots$ we have $$n_k\gs\f{b_k^2-1}8\gs\f{(2m+1)^2-1}8=\f{m(m+1)}2>m.$$ If $n_1,n_2,\ldots$ all belong to $S_{m^2}^{(a)}(r)$, then $S_{m^2}^{(a)}(r)$ is obviously infinite. Below we suppose that $S_{m^2}^{(a)}(r)$ does not contain all those $n_1,n_2,\ldots$. Let $k$ be any positive integer with $n_k\not\in S_{m^2}^{(a)}(r)$, i.e., $n_k=(2^ap-r)/m^2+T_z$ for some prime $p$ and $z\in\N$. Then $8n_k+1=8(2^ap-r)/m^2+y^2$, where $y=2z+1$ is a positive odd integer. Therefore $$2^{a+3}p=(8n_k+1)m^2+8r-(my)^2=(2x+b_km)^2-(my)^2.$$ Note that both $2x+b_km$ and $my$ are odd. As $2x+b_km>2b_k\gs2^{a+2}$, for some $i\in\{0,\ldots,a+1\}$ we have $$2x+b_km+my=2^{i+1}p\quad \t{and}\quad 2x+b_km-my=2^{a+2-i}.$$ (Note that $2x+b_km+my=p=2$ is impossible.) It follows that $$2x+b_km=\f{2^{i+1}p+2^{a+2-i}}2=2^ip+2^{a+1-i}.$$ Since $2x+b_km$ is odd, we must have $i\in\{0,a+1\}$. So \begin{equation} 2x+b_km\in\{p+2^{a+1},\ 2^{a+1}p+1\}. \end{equation} {\it Case}\ 1. $a>0$. In this case, $$2x+b_km\eq 2x+bm\eq-1\not\eq 1\ (\mo\ 2^{a+1}).$$ So $2x+b_km=p+2^{a+1}$. For each $l=1,2,3,\ldots$, obviously $$2x+b_{k+lp}m-2^{a+1}=2x+b_km-2^{a+1}+2^{a+1}lpm^2=p(1+2^{a+1}lm^2)$$ and hence it is not a prime number. Therefore all the infinitely many numbers $$n_{k+p}|q|$ such that $$bx\eq q+\f m4\da(1-x)\ (\mo\ 2m)$$ and hence $$\l(b+\f m4\da\r)^2\eq\l(bx+\f m4\da x\r)^2 \eq \l(q+\f m4\da\r)^2\eq1-\da\ (\mo\ 8).$$ For $k\in\N$ we set \begin{equation}b_k=b+\f m4\da+2km \quad\ \t{and}\quad \ n_k=\f{b_k^2+\delta-1}8+\f{b_kx-q-\da m/4}{2m}. \end{equation} Clearly $$b_k^2\eq\l(b+\f m4\da\r)^2\eq1-\da\ (\mo\ 8)$$ and $$b_kx\eq\l(b+\f m4\da\r)x\eq q+\f m4\da\ (\mo\ 2m).$$ So we have $n_k\in\Z$. Observe that $$(8n_k+1)\l(\f m2\r)^2+r=(b_k^2+\delta)\f{m^2}4+m\l(b_kx-q-\da\f m4\r)+mq+x^2=\l(\f m2b_k+x\r)^2.$$ For $k\in\Z^+$, obviously $b_k\gs b+2m>|q|+2m$ and hence $$n_k\gs\f{(2m+1)^2-1}8>m.$$ If $n_1,n_2,\ldots$ all belong to $S_{2m^2}(r)$, then $S_{2m^2}(r)$ is infinite. Below we assume that there is a positive integer $k$ such that $n_k\not\in S_{2m^2}(r)$, i.e., $n_k=(p-r)/(2m^2)+T_z$ for some prime $p$ and $z\in\N$. Then $8n_k+1=(p-r)/(m/2)^2+y^2$ with $y=2z+1\in\Z^+$. Thus $$p=(8n_k+1)\l(\f m2\r)^2+r-\l(\f m2y\r)^2=\l(\f m2b_k+x\r)^2-\l(\f m2y\r)^2.$$ Since $p$ is a prime, this implies that $$\f m2b_k+x-\f m2y=1\ \ \t{and}\ \ \f m2b_k+x+\f m2y=p.$$ As $0 88956$ can be written in the form $p+T_x$ with $x\in\Z^+$, where $p$ is either zero or a prime congruent to $1$ modulo $4$. Each natural number $n>90441$ can be written in the form $p+T_x$ with $x\in\Z^+$, where $p$ is either zero or a prime congruent to $3$ modulo $4$. {\rm (ii)} For $r\in\{1,3,5,7\}$, we can write any integer $n>N_r$ in the form $p+T_x$ with $x\in\Z$, where $p$ is either zero or a prime congruent to $r$ modulo $8$, and $$N_1=1004160,\ \ N_3=1142625,\ \ N_5=779646,\ \ N_7=893250.$$ \end{Conj} \Remark\ 3.1. We have verified Conjecture 3.1 for $n\ls 5,000,000$. Since any prime $p\eq1\ (\mo\ 8)$ can be written in the form $x^2+2(2y)^2$ with $x,y\in\Z$ (cf. [G, pp.\,165--166]), and all natural numbers not exceeding $1,004,160$ can be written in the form $x^2+8y^2+T_z$ with $x,y,z\in\Z$, Conjecture 3.1(ii) with $r=1$ implies the following deep result of Jones and Pall [JP] obtained by the theory of ternary quadratic forms: For each natural number $n$ there are $x,y,z\in\Z$ such that $n=x^2+8y^2+T_z$, i.e., $8n+1=2(2x)^2+(8y)^2+(2z+1)^2$. \medskip Here is a list of all natural numbers not exceeding 88,956 that cannot be written in the form $p+T_x$ with $x\in\Z$, where $p$ is either 0 or a prime congruent to 1 mod 4. \medskip 2, 4, 7, 9, 12, 22, 24, 25, 31, 46, 48, 70, 75, 80, 85, 87, 93, 121, 126, 135, 148, 162, 169, 186, 205, 211, 213, 216, 220, 222, 246, 255, 315, 331, 357, 375, 396, 420, 432, 441, 468, 573, 588, 615, 690, 717, 735, 738, 750, 796, 879, 924, 1029, 1038, 1080, 1155, 1158, 1161, 1323, 1351, 1440, 1533, 1566, 1620, 1836, 1851, 1863, 1965, 2073, 2118, 2376, 2430, 2691, 2761, 3156, 3171, 3501, 3726, 3765, 3900, 4047, 4311, 4525, 4605, 4840, 5085, 5481, 5943, 6006, 6196, 6210, 6471, 6810, 6831, 6840, 7455, 7500, 7836, 8016, 8316, 8655, 8715, 8991, 9801, 10098, 10563, 11181, 11616, 12165, 12265, 13071, 14448, 14913, 15333, 15795, 17085, 18123, 20376, 27846, 28161, 30045, 54141, 88956. \medskip Below is a list of all natural numbers not exceeding 90,441 that cannot be written in the form $p+T_x$ with $x\in\Z$, where $p$ is either 0 or a prime congruent to 3 mod 4. \medskip 2, 5, 16, 27, 30, 42, 54, 61, 63, 90, 96, 129, 144, 165, 204, 216, 225, 285, 288, 309, 333, 340, 345, 390, 405, 423, 426, 448, 462, 525, 540, 556, 624, 651, 705, 801, 813, 876, 945, 960, 1056, 1230, 1371, 1380, 1470, 1491, 1827, 2085, 2157, 2181, 2220, 2355, 2472, 2562, 2577, 2655, 2787, 2811, 2826, 2886, 3453, 3693, 3711, 3735, 3771, 3840, 3981, 4161, 4206, 4455, 4500, 4668, 4695, 4875, 6111, 6261, 7041, 7320, 7470, 8466, 8652, 8745, 9096, 9345, 9891, 9990, 10050, 10305, 10431, 11196, 13632, 13671, 14766, 15351, 16191, 16341, 16353, 16695, 18480, 18621, 19026, 19566, 22200, 22695, 22956, 27951, 35805, 43560, 44331, 47295, 60030, 90441. \medskip Conjecture 1.1 in the case $a=1$ and $b\in\{0,2\}$ can be refined as follows. \begin{Conj} {\rm (i)} Each natural number $n>43473$ can be written in the form $2p+T_x$ with $x\in\Z$, where $p$ is zero or a prime. {\rm (ii)} Any integer $n>636471$ can be written in the form $2p+T_x$ with $x\in\Z$, where $p$ is zero or a prime congruent to $1$ modulo $4$. Also, any integer $n>719001$ can be written in the form $2p+T_x$ with $x\in\Z$, where $p$ is zero or a prime congruent to $3$ modulo $4$. \end{Conj} \Remark\ 3.2. We have verified the conjecture for $n\ls 10,000,000$. As any natural number $n\ls 636,471$ not in the exceptional set $E$ given in Conjecture 1.2 is either a triangular number or a sum of two odd squares and a triangular number, Conjecture 3.2(ii) implies the second part of Conjecture 1.2 since any prime $p\eq1\ (\mo\ 4)$ can be written in the form $x^2+y^2$ with $x$ even and $y$ odd. \medskip Below is the full list of natural numbers not exceeding 43,473 that cannot be written in the form $2p+T_x$, where $p$ is 0 or a prime, and $x$ is an integer. \medskip 2, 8, 18, 30, 33, 57, 60, 99, 108, 138, 180, 183, 192, 240, 243, 318, 321, 360, 366, 402, 421, 429, 495, 525, 546, 585, 591, 606, 693, 696, 738, 831, 840, 850, 855, 900, 912, 945, 963, 1044, 1086, 1113, 1425, 1806, 1968, 2001, 2115, 2190, 2550, 2601, 2910, 3210, 4746, 5013, 5310, 5316, 5475, 5853, 6576, 8580, 9201, 12360, 13335, 16086, 20415, 22785, 43473. \medskip For the case $a=2$ and $b\in\{0,2\}$ of Conjecture 1.1, we have the following concrete conjecture. \begin{Conj} {\rm (i)} Any integer $n>849,591$ can be written in the form $4p+T_x$ with $x\in\Z$, where $p$ is zero or a prime. {\rm (ii)} Each integer $n>7,718,511$ can be written in the form $4p+T_x$ with $x\in\Z$, where $p$ is either zero or a prime congruent to $1$ modulo $4$. And each integer $n>6,276,705$ can be written in the form $4p+T_x$ with $x\in\Z$, where $p$ is either zero or a prime congruent to $3$ modulo $4$. \end{Conj} \Remark\ 3.3. We have verified Conjecture 3.3 for $n\ls 30,000,000$. \medskip For $a\in\N$ we define $f(a)$ to be the largest integer not in the form $2^ap+T_x$, where $p$ is zero or a prime, and $x$ is an integer. Our conjectures 1.1 and 3.2-3.3, and related computations suggest that $$f(0)=216,\ \ f(1)=43473,\ \ f(2)=849591.$$ \medskip Concerning Conjecture 1.4 in the cases $b=2,3$ we have the following concrete conjecture. \begin{Conj} {\rm (i)} Let $n>1$ be an odd integer. Then $n$ can be written in the form $p+x(x+1)$ with $p$ a prime congruent to $1$ mod $4$ and $x$ an integer, if and only if $n$ is not among the following $30$ multiples of three: $$\aligned&3,\, 9,\, 21,\, 27,\, 45,\, 51,\, 87,\, 105,\, 135,\, 141, \\&189,\, 225,\, 273,\, 321,\, 327,\,471,\, 525,\, 627,\,741,\, 861, \\&975,\, 1197,\, 1461,\, 1557,\, 1785,\, 2151,\, 12285,\, 13575,\, 20997,\, 49755. \endaligned$$ Also, $n$ can be written in the form $p+x(x+1)$ with $p$ a prime congruent to $3$ mod $4$ and $x$ an integer, if and only if $n$ is not among the following $15$ multiples of three: $$\aligned&57,\, 111,\, 297,\, 357,\, 429,\, 615,\, 723,\, 765, \\&1185,\, 1407,\, 2925,\, 3597,\, 4857,\, 5385,\, 5397. \endaligned$$ {\rm (ii)} For each $r\in\{1,3,5,7\}$, any odd integer $n>M_r$ can be written in the form $p+x(x+1)$ with $p$ a prime congruent to $r$ mod $8$ and $x$ an integer, where $$M_1=358245,\ M_3=172995,\ M_5=359907,\ M_7=444045.$$ \end{Conj} \Remark\ 3.4. We have verified Conjecture 3.4 for odd integers below $5\times10^6$. It is curious that all the exceptional numbers in the first part of Conjecture 3.4 are multiples of three. \medskip \section{Additional Remarks on Conjectures 1.2 and 1.3} \setcounter{equation}{0} \setcounter{Thm}{0} \setcounter{Lem}{0} \setcounter{Cor}{0}\setcounter{Conj}{0} As usual, we set $$\varphi(q)=\sum_{n=-\infty}^{\infty}q^{n^2}\ \ \t{and}\ \ \psi(q)=\sum_{n=0}^{\infty}q^{T_n}\ \ \ (|q|<1).$$ There are many known relations between these two theta functions (cf. Berndt [B, pp.\,71-72]). For a $q$-series $F(q)$ we use $[q^n]F(q)$ to denote the coefficient of $q^n$ in $F(q)$. By the generating function method, Conjecture 1.2 tells that $$\aligned &[q^n]\varphi^2(q^4)\psi(q)>0\ \ \ \t{for any}\ n>864, \\ &[q^n]\varphi(q^4)\varphi(q^{16})\psi(q)>0\ \ \ \t{for any}\ n>2577, \\&[q^n](1+q^2\psi^2(q^8))\psi(q)>0\ \ \ \t{for any}\ n>1029. \endaligned$$ Here are some of our observations concerning Conjecture 1.3 arising from numerical computations up to $10^6$: $$S_3=\{4,\, 2578\},\ S_4=\{39\},\ S_{10}=\{87,\, 219,\, 423\},\ S_{60}=\{649,\,1159\};$$ $$S_{15}=\{16,\,49,\,77,\,91,\,136,\,752,\,808,\,931\},\ S_{18}=\{803\};$$ $$S_{24}=\{25,\,49,\,289,\,889,\,1585\},\ S_{36}=\{85,\,91,\,361,\,451,\,1501\};$$ $$\aligned S_{48}=\{&49,\,125,\,133,\,143,\,169,\,209,\,235,\,265,\,403,\,473,\, \\&815,\,841,\,1561,\,1679,\,4325,\,8075,\,14953\}.\endaligned$$ $$\aligned S_3^{(1)}=\{&5,\,8,\,11,\,16,\,20,\,50,\,53,\,70,\,113,\,128,\,133,\,200,\,233, \\&\,245,\,275,\,350,\,515,\,745,\,920,\,1543,\,1865,\,2158,\,3020\}. \endaligned$$ $$S_8(1)=\{1,\,4,\,7,\,16,\,28,\,46,\,88,\,91,\,238,\,373,\,1204\},\ S_8(5)=\{26,\,65,\,176\};$$ $$S_9(1)=\{1,\,6,\,16,\,141\},\ S_9(4)=\{5,\, 19,\,50,\,75\}, \ S_9(7)=\{2,\,73,\,98,\,232,\,448\}.$$ \bigskip \noindent{\bf Added in proof}. The author has set up a webpage devoted to mixed sums of primes and other terms with the website {\tt http://math.nju.edu.cn/$\sim$zwsun/MSPT.htm}. %\widestnumber \key{GPS} %\Refs \begin{thebibliography}{GPS} \bibitem[B]{B} B. C. Berndt, {\it Number Theory in the Spirit of Ramanujan}, Amer. Math. Soc., Providence, R.I., 2006. \bibitem[G]{G} J. R. Goldman, {\it The Queen of Mathematics: A Historically Motivated Guide to Number Theory}, A K Peters, Wellesley, MA, 1998. \bibitem[Gr]{Gr} E. Grosswald, {\it Representation of Integers as Sums of Squares}, Springer, New York, 1985. \bibitem[GPS]{GPS} S. Guo, H. Pan and Z. W. Sun, {\it Mixed sums of squares and triangular numbers (II)}, Integers \textbf{7} (2007), A56, 5pp (electronic). \bibitem[IR]{IR} K. Ireland and M. Rosen, {\it A Classical Introduction to Modern Number Theory}, Graduate Texts in Math., vol. 84, 2nd ed., Springer, New York, 1990. \bibitem[JP]{JP} B. W. Jones and G. Pall, {\it Regular and semi-regular positive ternary quadratic forms}, Acta Math. \textbf{70} (1939), 165--191. \bibitem[KY]{KY} J. O. Kiltinen and P. B. Young, {\it Goldbach, Lemoine, and a know/don't know problem}, {\it Math. Mag.} \textbf{58} (1985), no. 4, 195--203. \bibitem[L1]{L1} Yu. V. Linnik, {\it All large numbers are sums of a prime and two squares (A problem of Hardy and Littlewood). I}, Mat. Sb. (N.S.) \textbf{52} (1960), 661--700. \bibitem[L2]{L2} Yu. V. Linnik, {\it All large numbers are sums of a prime and two squares (A problem of Hardy and Littlewood). II}, Mat. Sb. (N.S.) \textbf{53} (1961), 3--38. \bibitem[N]{N} M. B. Nathanson, {\it Additive Number Theory: the Classical Bases}, Grad. Texts in Math., vol. 164, Springer, New York, 1996. \bibitem[S]{S} Z. W. Sun, {\it Mixed sums of squares and triangular numbers}, Acta Arith. \textbf{127} (2007), 103--113. \bibitem[V]{V} I. M. Vinogradov, {\it The representation of an odd number as a sum of three primes}, Dokl. Akad. Nauk. SSSR \textbf{16} (1937), 139--142. \end{thebibliography} \label{lastpage-01} \end{document}