<<

View metadata, citation and similar papers at core.ac.uk brought to you by CORE

provided by University of Strathclyde Institutional Repository

Estrada, Ernesto (2018) Integer-digit functions : an example of math-art integration. Mathematical Intelligencer, 40 (1). pp. 73-78. ISSN 1866- 7414 , http://dx.doi.org/10.1007/s00283-017-9726-x This version is available at https://strathprints.strath.ac.uk/66389/ Strathprints is designed to allow users to access the research output of the University of Strathclyde. Unless otherwise explicitly stated on the manuscript, Copyright © and Moral Rights for the papers on this site are retained by the individual authors and/or other copyright owners. Please check the manuscript for details of any other licences that may have been applied. You may not engage in further distribution of the material for any profitmaking activities or any commercial gain. You may freely distribute both the url (https://strathprints.strath.ac.uk/) and the content of this paper for research or private study, educational, or not-for-profit purposes without prior permission or charge. Any correspondence concerning this service should be sent to the Strathprints administrator: [email protected]

The Strathprints institutional repository (https://strathprints.strath.ac.uk) is a digital archive of University of Strathclyde research outputs. It has been developed to disseminate open access research outputs, expose data about those outputs, and enable the management and persistent access to Strathclyde's intellectual output. Integer-Digit Functions: An Example of Math- Art Integration

ERNESTO ESTRADA

‘‘God made the integers, all else is the work of man.’’ L. Kronecker

athematics and the visual arts mutually reinforce Digit Sum with ‘‘Memory’’ one another [10]. On the one hand, many math- A nonnegative integer N can be represented in a given base MMematical objects appear in artistic or decorative b according to the following expression works [5, 6]. In particular, mathematical and art have N a bn a bnÀ1 a bnÀ2 a b a ; 1 a long-standing connection through the application of ¼ 1 þ 2 þ 3 þÁÁÁþ nÀ1 þ n ð Þ

geometric principles [13, 20]. Simple curves such as the where ai are nonnegative integers. We can represent a catenary are ubiquitous, for example in the work of the negative integer in a similar way if we multiply by À1 the Catalan architect Antoni Gaudı´, as well as in ancient [19] right-hand-side part of the previous . For instance, and in modern architecture [12]. On the other hand, many the number N ¼ 257, expressed in the base b ¼ 10, is: mathematical objects display artistic appeal per se. The vast 2 list includes, among others: [1, 2], mosaics and tiles 257 ¼ 2 Á 10 þ 5 Á 10 þ 7: [3, 21], Fourier series [9], topological tori [15], and A function explored in several contexts [14] is the ‘‘digit curves [4], all of which produce visual patterns of undeni- sum,’’ or ‘‘sum of digits’’ of a given integer, defined by: able beauty. Such connections between mathematics and the arts are explored and celebrated annually by the n bclogb N 1 S ðÞ¼N a ¼ N modbkþ1 À N modbk : ð2Þ Bridges community formed by mathematicians and artists b X i X bk ÀÁ [8, 18]. i¼1 k¼0 This article introduces a new family of curves in the For instance, for b ¼ 10 the digit sum of 257 is plane defined by functions transforming an integer 2 þ 5 þ 7 ¼ 14. The digit sum forms an integer sequence according to sums of digit-functions. These transforms of registered in the Online Encyclopedia of Integer Sequences an integer N are obtained by multiplying the function value (OEIS) [16, 17] by the sequence A007953. One characteristic fNðÞby the sum of faðÞi , where ai are the digits of N in a of the digit sum function is that it does not ‘‘remember’’ the given base b and f is a standard function such as a integer that gave rise to it. That is, we can find many dif- trigonometric, logarithmic, or exponential one. These ferent integers for which the digit sum is the same. For curves display a few attributes, such as beauty, , instance, S10ðÞ59 ¼ S10ðÞ77 ¼ S10ðÞ95 ¼ S10ðÞ149 ¼ÁÁÁ¼ and resemblance to natural environments, which make S10ð257 Þ¼ÁÁÁ¼14. them attractive for artistic purposes.

Ó 2018 The Author(s). This article is an open access publication, Volume 40, Number 1, 2018 73 https://doi.org/10.1007/s00283-017-9726-x ×104 3 Integer-Digit Functions Now we extend this idea to other functions. Let fNðÞ be a function of the integer N, for example, sinðÞN . 2.5 Then we define the sum of digit-functions fNðÞof fNðÞby: d fNðÞ¼ðÞfaðÞþ1 fað2 ÞþÁÁÁþfaðÞn fNðÞ: ð3Þ 2 d Here, once again, we are using the previous notation; that is, the nonnegative integers ai are the digits of N in base b. For instance, sinðÞ¼ 257 ðÞsinðÞþ 2 sinðÞþ 5 sinðÞ 7 ÁsinðÞ 257 ˆ x 1.5 À0:2357. For negatived integers ÀN , if the function f ðÞÀN exists, we obtain 1 fðÞÀN ¼ðÞfaðÞ1 þfaðÞ2 þÁÁÁþfaðÞn f ðÞÀN : ð4Þ d As an example, the plot of sinðÞN versus N isgiveninFigure2 0.5 (left panel), which mildly resemblesd the original sine function. Our main interest here is, however, to make a com- plete transformation of both coordinate axes in terms of 0 0 200 400 600 800 1000 our digit-function. That is, we are interested in the x plotting of fNðÞversus gNðÞ. For instance, when sinðÞN is plotted versusd N in Figured 2 (right panel), a totallyd Figure 1. Plot of N versus N for integers less than or equal to unexpected patternb emerges. This pattern does not 1000. b resemble at all the original function and, if rotated by À90 degrees, it resembles a bush. A simple modification of the digit sum function that In the rest of this article we will be interested in the curves ‘‘remembers’’ its origins better can be obtained by multi- we obtain from certain combinations of fNðÞand gNðÞ.To plying the digit sum of N by N [7]. Hereafter we represent represent the curves we use here the followingd method.d For this function by N . In the previous example we have a given even number of points n, the we want is n 257 ¼ 257 Á 14 ¼ 3598.b This function is not different for obtained for the integers N  using a parametric form of 2 everyd integer, thus we cannot say that it remembers its the equation, origins perfectly, but at least it is not as degenerate as the digit sum. The corresponding integer sequence is given at x ¼ fNðÞ; ð5Þ the OEIS by A117570 [16]. In Figure 1 we illustrate the plot d of N versus N for the first 1000 integers. y ¼ gNðÞ: ð6Þ b d 0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1 ) ) x x ( ( 0 0 sin sin -0.1 -0.1

-0.2 -0.2

-0.3 -0.3

-0.4 -0.4

-0.5 -0.5 0 200 400 600 800 1000 0 0.5 1 1.5 2 2.5 3 x x ×104

Figure 2. Semideconstruction of the sine function (left) and total deconstruction of the same (right).

74 THE MATHEMATICAL INTELLIGENCER Figure 4. Sine after the integer-digit transform using n ¼ 2000 points (left) and another view of it (right) using colormap ‘‘Jet’’ for artistic impression. To prepare the second image, we Figure 3. Curve defined by (7)–(8) with n ¼ 1000 simply rotate the negative part of the curve to obtain a mirror points. The left panel illustrates the discrete character of the symmetry. On the left-hand side we use red for negative values curve. Note also that negative inputs are distinguishable from of N and blue for positive ones. positive inputs. In the image on the left, red is used for negative values of N and blue for positive ones. The image on the right is obtained by joining the dots with lines to give a more fluid view. In the right panel we used a ‘‘Jet’’ colormap to color the curve.

If the functions fNðÞand gNðÞare also defined for nega- tive arguments, thed correspondingd transforms are obtained n for À  N . 2 All trigonometric functions are obtained in degrees. For instance, let x ¼ N ; ð7Þ b Figure 5. of the circle after the integer-digit trans- y ¼ sin N À N Á cos N : ð8Þ form using n ¼ 4000 points (left) and a coloring of it using d b d ‘‘Parula’’ color map (right). Then for n ¼ 1000, we obtain the curve illustrated in the left panel of Figure 3. Notice that the curves are discrete because we only evaluate our functions at integer values. However, we can join the points to create a more fluid form; see the right panel of Figure 3, in which we used the x ¼ sin N À N Á cos N ; ð11Þ 1 colormap function available in MatlabÒ. d b d y ¼ cos N þ N Á sin N : ð12Þ Artistic Creation Using Integer-Digit Functions d b d and the corresponding curve is illustrated in Figure 5. Now we play with this construction and transform some The analogue of the astroid using the integer-digit well-known curves, such as sine, involute of a circle, transform is given by astroid, and others. Let us start by the simple sine function in which we make the transformation 3 x ¼ cos N ; ð13Þ x ¼ N ; ð9Þ d 3 b y ¼ sin N ; ð14Þ y ¼ sin N : ð10Þ d d and the corresponding curve for n ¼ 10; 000 points is This function is illustrated in Figure 4 for n ¼ 2000 points. illustrated in Figure 6. The artistic representation of the curve given on the right- The cardioid curve can be transformed using the fol- hand-side of the figure clearly resembles a butterfly and can lowing parametric equations serve as the basis for more artistic inspirations. We now explore the transformation of both coordinate x ¼ 2cos N þ cosðÞ 2N ; ð15Þ axes for the involute of a circle. This function is given by d d the following y ¼ 2sin N þ 3sinðÞ 2N : ð16Þ d d

1All images in this article were created in MatlabÒ. Any interested reader can obtain the code from the author via e-mail.

Ó 2018 The Author(s). This article is an open access publication, Volume 40, Number 1, 2018 75 Figure 8. Composition of integer-digit transform (left) and another view of the same composition (right).

Figure 6. Astroid after the integer-digit transform using n ¼ 10; 000 points (left) and a coloring of it using the colormap In Figure 7 we plot the curve corresponding to the trans- ‘‘Hot’’ and a grey background (right). formed cardioid, which resembles a fish. Although ‘‘beauty is in the eye of the beholder’’ there is no doubt that these plots have certain artistic attributes that overall make them in some way unexpectedly beautiful. In the next section we explore some further possibilities for artistic creation.

Artistic Compositions Let us start by seeing what we get when we compose functions. We combine the function:

x ¼ sin N À N Á cos N ; ð17Þ dy ¼ Nb; d ð18Þ b with

x ¼ 3000sin N À 1000; ð19Þ y ¼dN ; ð20Þ b and

x ¼À3000sin N þ 1000; ð21Þ y ¼dN ; ð22Þ b Figure 7. Cardioid after the integer-digit transform using n ¼ to make the composition illustrated in the Figure 8. 50; 000 points and using a combination of ‘‘Jet’’ and ‘‘Cooper’’ Next we introduce logarithmic functions into the mix. colormaps. The function

Figure 9. Curve obtained by using logarithmic integer-digit transform for n ¼ 5000 points (left) and two modified views of it. Red is used for negative values of t and blue for positive ones.

76 THE MATHEMATICAL INTELLIGENCER to produce a landscape and a seascape. In the top panel we show the combination of functions used for producing Figures 4 and 8. In the bottom panel we use the function x ¼ N ; ð25Þ b y ¼ ln N ; ð26Þ d to produce the plants and then combine it with the function used to produce Figure 7 to make the final composition. The artistic compositions presented here may seem simple and naive. But is it not surprising that they were entirely produced by a mathematical procedure based only on integers– with just a little extra imagination?

ACKNOWLEDGMENTS The author thanks artist Puri Pereira for useful discussions. He also thanks the Royal Society of London for a Wolfson Research Merit Award. Finally he thanks Gizem Karaali for her editorial assistance.

Department of Mathematics & Statistics University of Strathclyde Livingstone Tower, 26 Richmond Street Glasgow G1 1XQ UK e-mail: [email protected]

OPEN ACCESS This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http:// creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

REFERENCES 1. A. A˚ stro¨ m, and C. A˚ stro¨ m, Circular knotworks consisting of pattern no. 295: a mathematical approach, Journal of Mathe- Figure 10. Combination of integer-digit curves to produce a matics and the Arts 5 (2011), 185–197. landscape and a seascape based on the examples here. 2. R. Bosch, Simple-closed-curve sculptures of knots and links, Journal of Mathematics and the Arts 4 (2010), 57–71. 3. R. Bosch, and U. Colley, Figurative mosaics from flexible Truchet x ¼ sin N ; ð23Þ tiles, Journal of Mathematics and the Arts 7 (2013), 122–135. d y ¼ ln N ; ð24Þ 4. J. Briggs, : The patterns of chaos: a new aesthetic of art, d science, and nature, Simon and Schuster (1992). is illustrated in the left-hand-side of Figure 9. The second 5. P. R. Cromwell, Celtic knotwork: mathematical art, The Mathe- view was created with some of the filters available in matical Intelligencer 15 (1993), 36–47. PowerPoint. Here, as the log function is not defined for 6. P. R. Cromwell, The search for quasi-periodicity in Islamic 5-fold negative numbers we plot Àsin N versus ln N , and sin N ornament, The Mathematical Intelligencer 31 (2009), 36–56. versus ln N to produce a symmetricd image.d A very simpled 7. E. Estrada, and L. A. Pogliani, A new integer sequence based on modificationd in the last image produces what in the eyes of the sum of digits of integers. Kragujevac Journal of Sciences 30 the beholder resembles the face of a fox. (2008), 45–50. Finally in Figure 10, we present two naive combinations 8. K. Fenyvesi, Bridges: A World Community for Mathematical Art, of some of the previously obtained integer-digit transforms The Mathematical Intelligencer 38 (2016), 35–45.

Ó 2018 The Author(s). This article is an open access publication, Volume 40, Number 1, 2018 77 9. F. A. Farris, Symmetric yet organic: Fourier series as an artist’s 16. N. J. A. Sloane and S. Plouffe, The Encyclopedia of Integer tool, Journal of Mathematics and the Arts 7 (2013), 64–82. Sequences, Academic Press. Web, edition at https://oeis.org. 10. L. Gamwell, : A Cultural History, Princeton 17. N. J. A. Sloane, My Favorite Integer Sequences, in C. Ding, T. University Press (2015). Helleseth, and H. Niederreiter, eds. Sequences and their Appli- 11. G. Irving, and H. Segerman, Developing fractal curves, Journal of cations (Proceedings of SETA ’98), Springer-Verlag, pp. 103– Mathematics and the Arts 7 (2013), 103–121. 130, 1999. 12. G. Kaplan, The Catenary: Art, Architecture, History, and Math- 18. , Bridges, website, http://www.bridge ematics, Bridges Leeuwarden: Mathematics, Music, Art, smathart.org/. Architecture, Culture. Tarquin Publications (2008). 19. H. Yanai, and K. Williams, Curves in traditional architecture in East 13. L. Koudela, Curves in the history of mathematics: the late Asia, The Mathematical Intelligencer 23 (2001), 52–57. renaissance, WDS’05 Proceedings of Contributed Papers, Part I 20. R. C. Yates, A Handbook of Curves and their Properties, Literary (2005), pp. 198–202. Licensing, LLC (2012). 14. C. Mauduit, Substitutions et ensembles normaux, Habilitation Dir. 21. X. Zheng, and N. S. Brown, Symmetric designs on hexagonal tiles Rech., Universit Aix-Marseille II, 1989. of a hexagonal lattice, Journal of Mathematics and the Arts 6 15. C. H. Se´ quin, Topological tori as abstract art, Journal of (2012), 19–28. Mathematics and the Arts 6 (2012), 191–209.

78 THE MATHEMATICAL INTELLIGENCER