The Ramanujan Journal

, Volume 6, Issue 4, pp 469–490 | Cite as

Sums of Five, Seven and Nine Squares

  • Shaun Cooper


Let rk(n) denote the number of representations of an integer n as a sum of k squares. We prove that
$$\begin{gathered} r_5 \left( n \right) = r_5 \left( {n\prime } \right)\left[ {\frac{{2^{3\left\lfloor {\lambda /2} \right\rfloor + 3} - 1}}{{2^3 - 1}} - \varepsilon _5 \left( {n\prime } \right)\frac{{2^{3\left\lfloor {\lambda /2} \right\rfloor } - 1}}{{2^3 - 1}}} \right] \hfill \\ {\text{ }} \times \mathop \prod \limits_p \left[ {\frac{{p^{3\left\lfloor {\lambda p/2} \right\rfloor + 3} - 1}}{{p^3 - 1}} - p\left( {\frac{{n\prime }}{p}} \right)\frac{{p^{3\left\lfloor {\lambda p/2} \right\rfloor } - 1}}{{p^3 - 1}}} \right], \hfill \\ \end{gathered}$$
$$\varepsilon _5 \left( {n\prime } \right) = \left\{ \begin{gathered} {\text{0 if }}n\prime \equiv 1 \left( {\bmod {\text{ }}8} \right) \hfill \\ 4{\text{ if }}n\prime \equiv 2{\text{ or 3 }}\left( {\bmod {\text{ 4}}} \right) \hfill \\ 16/7{\text{ if }}n\prime \equiv 5{\text{ }}\left( {\bmod {\text{ 8}}} \right). \hfill \\ \end{gathered} \right.$$
Here n = 2λppλp is the prime factorisation of n, n′ is the square-free part of n, the products are taken over the odd primes p, and (\(\frac{n}{p}\)) is the Legendre symbol.

Some similar formulas for r7(n) and r9(n) are also proved.

Hecke operator modular forms of half integer weight sums of squares 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    P. Barrucand and M.D. Hirschhorn, “Formulae associated with 5, 7, 9 and 11 squares,” Bull. Austral. Math. Soc. 65 (2002), 503-510.Google Scholar
  2. 2.
    B.C. Berndt, Ramanujan's Notebooks, Part II, Springer-Verlag, New York, 1989.Google Scholar
  3. 3.
    B.C. Berndt, Ramanujan's Notebooks, Part III, Springer-Verlag, New York, 1991.Google Scholar
  4. 4.
    H. Cohen, “Sommes de carrés, fonctions L et formes modulaires,” C. R. Acad. Sci. Paris, S´er. A-B 277 (1973), 827-830.Google Scholar
  5. 5.
    S. Cooper, “On sums of an even number of squares, and an even number of triangular numbers: An elementary approach based on Ramanujan's 1?1 summation formula,” q-Series with Applications to Combinatorics, Number Theory and Physics (B.C. Berndt and K. Ono, eds.), Contemporary Mathematics, No. 291, American Mathematical Society, Providence, RI, 2001, pp. 115-137.Google Scholar
  6. 6.
    S. Cooper, “On the number of representations of integers as sums of eleven or thirteen squares,” Research Letters in the Information and Mathematical Sciences, Massey University, New Zealand 3 (2002), 37-58. Available electronically at Scholar
  7. 7.
    L.E. Dickson, History of the Theory of Numbers, Vol. 2, Chelsea, New York, 1952.Google Scholar
  8. 8.
    J.W.L. Glaisher, “On the numbers of representations of a number as a sum of 2r squares, where 2r does not exceed eighteen,” Proc. London Math. Soc. 5(2) (1907), 479-490.Google Scholar
  9. 9.
    G.H. Hardy, “On the representations of a number as the sum of any number of squares, and in particular of five or seven,” Proc. Nat. Acad. Sci., U.S.A. 4 (1918), 189-193.Google Scholar
  10. 10.
    G.H. Hardy, “On the representation of a number as the sum of any number of squares, and in particular of five,” Trans. Amer. Math. Soc. 21 (1920), 255-284.Google Scholar
  11. 11.
    G.H. Hardy and E.M. Wright, An Introduction to the Theory of Numbers, 5th edn., Clarendon Press, Oxford, 1979.Google Scholar
  12. 12.
    M.D. Hirschhorn and J. Sellers, “On representations of a number as a sum of three squares,” Discrete Math. 199 (1999), 85-101.Google Scholar
  13. 13.
    A. Hurwitz, “Sur la décomposition des nombres en cinq carrés,” Paris, C. R. Acad. Sci. 98 (1884), 504-507.Google Scholar
  14. 14.
    A. Hurwitz, L'Intermédiaire des Mathematiciens 14 (1907), 107.Google Scholar
  15. 15.
    A. Hurwitz, Mathematische Werke von Adolf Hurwitz, Band II, Birkhauser, Basel, 1933.Google Scholar
  16. 16.
    C.G.J. Jacobi, Gesammelte Werke, Vol. 1, Berlin, 1881. Reprinted by Chelsea, New York, 1969.Google Scholar
  17. 17.
    N. Koblitz, Introduction to Elliptic Curves and Modular Forms, Springer-Verlag, New York, 1984.Google Scholar
  18. 18.
    G.A. Lomadze, “On the representation of numbers by sums of squares,” (Russian) Akad. Nauk Gruzin. SSR. Trudy Tbiliss. Mat. Inst. Razmadze 16 (1948), 231-275.Google Scholar
  19. 19.
    G.A. Lomadze, “On the number of representations of natural numbers by sums of nine squares,” (Russian) Acta Arith. 68(3) (1994), 245-253.Google Scholar
  20. 20.
    H. Minkowski, “Mémoire sur la théorie des formes quadratiques à coefficients entiéres,” Mémoires présentés par divers savants à l'Académie 29(2) (1887), 1-178; reprinted in Gesammelte Abhandlungen von Hermann Minkowski, B. 1, 3-144, Leipzig, Berlin, B.G. Teubner, 1911.Google Scholar
  21. 21.
    S. Ramanujan, “On certain arithmetical functions,” Trans. Camb. Phil. Soc. 22 (1916), 159-184. Also in Collected Papers of Srinivasa Ramanujan, 136-162, AMS Chelsea, Providence, RI, 2000.Google Scholar
  22. 22.
    S. Ramanujan, Notebooks (2 volumes), Tata Institute of Fundamental Research, Bombay, 1957.Google Scholar
  23. 23.
    S. Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa, New Delhi, 1988.Google Scholar
  24. 24.
    H.J.S. Smith, “Mémoire sur la représentation des nombres par des sommes de cinq carrés,”Mémoires présentés par divers savants à l'Académie 29(1), (1887), 1-72; reprinted in The Collected Mathematical Papers of H.J.S. Smith, Vol. 2, 1894, pp. 623-680; reprinted by Chelsea, New York, 1965.Google Scholar
  25. 25.
    T.J. Stieltjes, “Sur le nombre de décompositions d'un entier en cinq carrés,” Paris, C. R. Acad. Sci. 97 (1883), 1545-1547.Google Scholar
  26. 26.
    T.J. Stieltjes, “Sur quelques applications arithmétiques de la théorie des fonctions elliptiques,” Paris, C. R. Acad. Sci. 98 (1884), 663-664.Google Scholar
  27. 27.
    T.J. Stieltjes, OEuvres Complè tes de Thomas Jan Stieltjes, Tome 1, P. Noordhoff, Groningen, 1914.Google Scholar

Copyright information

© Kluwer Academic Publishers 2002

Authors and Affiliations

  • Shaun Cooper
    • 1
  1. 1.Institute of Information and Mathematical SciencesMassey University—AlbanyAucklandNew Zealand

Personalised recommendations