Segment Counting Versus Prime Counting in the Ulam Square

  • Leszek J. ChmielewskiEmail author
  • Arkadiusz Orłowski
  • Grzegorz Gawdzik
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10192)


Points that correspond to prime numbers in the Ulam square form straight line segments of various lengths. It is shown that the relation between the number of the segments and the number of primes present in a given square steadily grows together with the growing values of the prime numbers in the studied range up to 25 009 991 and is close to double log. These observations were tested also on random dot images to see if the findings were not a result of merely the abundance of data. In random images the densities of the longer segments and the lengths of the longest ones are considerably smaller than those in the Ulam square, while for the shorter segments it is the opposite. This could lead to a cautious presumption that the structure of the set of primes might contain long-range relations which do not depend on scale.


Prime counting function pi function Ulam spiral Ulam square Line segments Segment counting Hough transform 


  1. 1.
    Caldwell, C.K.: How many primes are there? In: The Prime Pages [2]. Accessed 15 Oct 2016
  2. 2.
    Caldwell, C.K. (ed.): The Prime Pages (2016). Accessed 15 Oct 2016
  3. 3.
    Chmielewski, L.J., Orłowski, A.: Hough transform for lines with slope defined by a pair of co-primes. Mach. Graph. Vis. 22(1/4), 17–25 (2013). Open access: Google Scholar
  4. 4.
    Chmielewski, L.J., Orłowski, A.: Finding line segments in the Ulam square with the Hough transform. In: Chmielewski, L.J., Datta, A., Kozera, R., Wojciechowski, K. (eds.) ICCVG 2016. LNCS, vol. 9972, pp. 617–626. Springer, Heidelberg (2016). doi: 10.1007/978-3-319-46418-3_55 CrossRefGoogle Scholar
  5. 5.
    Chmielewski, L.J., Orłowski, A.: Prime numbers in the Ulam square (2016). Accessed 14 Oct 2016
  6. 6.
    Chmielewski, L.J., Orłowski, A., Janowicz, M.: A study on directionality in the Ulam square with the use of the Hough transform. In: Kobayashi, S., Piegat, A., Pejaś, J., El Fray, I., Kacprzyk, J. (eds.) ACS 2016. AISC, vol. 534, pp. 81–90. Springer, Heidelberg (2017). doi: 10.1007/978-3-319-48429-7_8 CrossRefGoogle Scholar
  7. 7.
    Stein, M.L., Ulam, S.M., Wells, M.B.: A visual display of some properties of the distribution of primes. Am. Math. Mon. 71(5), 516–520 (1964). doi: 10.2307/2312588
  8. 8.
    Weisstein, E.W.: Prime counting function. From MathWorld–AWolfram Web Resource (2016). Accessed 15 Oct 2016
  9. 9.
    Weisstein, E.W.: Prime spiral. From MathWorld–A Wolfram Web Resource (2016). Accessed 15 Oct 2016

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Leszek J. Chmielewski
    • 1
    Email author
  • Arkadiusz Orłowski
    • 1
  • Grzegorz Gawdzik
    • 1
  1. 1.Faculty of Applied Informatics and Mathematics – WZIMWarsaw University of Life Sciences – SGGWWarsawPoland

Personalised recommendations