Showing posts with label sum of two squares. Show all posts
Showing posts with label sum of two squares. Show all posts

Wednesday, 2 September 2026

Let Us Count the Ways

I was curious as to how to count the number of ways that a given number can be represented in Loeschian form based on its prime factorisation. I knew there was such a method for counting how many ways a number can be represented as a sum of two squares. I got Gemini to investigate, compare and summarise the results. Notice the use of the ceiling function when determining the number of essentially distinct pairs. Remember also that the invalid primes become valid if raised to an even power but they don't contribute to the count. The \(b_{\textit{i}}\) in the table refers to the exponents of the generating primes.

The algebraic frameworks for expressing integers as \(x^2 + xy + y^2\) and \(x^2 + y^2\) mirror each other directly through their respective complex integer rings.

Characteristic Loeschian Form \(x^2 + xy + y^2\) Sum of Two Squares \(x^2 + y^2\)
Complex Ring Eisenstein Integers \(\mathbb{Z}[e^{2\pi i/3}]\) Gaussian Integers \(\mathbb{Z}[i]\)
Invalid Primes
(Require Even Exponents)
\(p \equiv 2 \pmod 3\) \(p \equiv 3 \pmod 4\)
Generating Primes
(Exponents \(b_i\))
\(p \equiv 1 \pmod 3\) \(p \equiv 1 \pmod 4\)
Neutral Prime \(p = 3\) \(p = 2\)
Unit Symmetries
(Multiplier)
6 4
Total Ordered Pairs \((x,y)\) \(6 \prod (b_i + 1)\) \(4 \prod (b_i + 1)\)
Essentially Distinct Pairs \(\{x,y\}\) \(\lceil \frac{1}{2} \prod (b_i + 1) \rceil\) \(\lceil \frac{1}{2} \prod (b_i + 1) \rceil\)

Factorization Conditions

Both systems demand that primes which cannot be represented natively by the quadratic form must be "squared away" with even exponents in the prime factorization. For Gaussian integers, primes congruent to \(3 \pmod 4\) (such as 3, 7, 11) cannot form sums of two squares. For Eisenstein integers, primes congruent to \(2 \pmod 3\) (such as 2, 5, 11) cannot be Loeschian. If any of these restricted primes have an odd exponent, the integer cannot be represented in that form, and the total count is zero.

Symmetry and Distinct Ways

The difference in the total number of ordered coordinate pairs stems entirely from the geometry of the complex rings. Gaussian integers form a square lattice with 4 units (\(\pm 1, \pm i\)), leading to a rotational symmetry multiplier of 4. Eisenstein integers form a hexagonal lattice with 6 units (\(\pm 1, \pm e^{2\pi i/3}, \pm e^{4\pi i/3}\)), leading to a multiplier of 6.

Once these geometric symmetries are factored out by dividing by the respective unit count, both systems calculate the number of essentially distinct, non-negative integer pairs using the exact same ceiling function formula. The generating primes dictate this final count, while the unique neutral prime in each system scales the base integer without creating new algebraic variations.

Monday, 17 August 2026

28260: An Interesting Number

Sometimes it's difficult to find many interesting properties for numbers greater than 28000. However, 28260 is definitely not one of those sorts of numbers. It has a plethora of interesting properties and in this post I'll list some of them. Firstly though, let's list its prime factorisation:$$ \textbf{28260} = 2^2 \times 3^2 \times 5 \times 157$$PROPERTY 1: sum of two squares

As can be seen, the number is a product of a power of 2 (\( 2^2\)), a 4\(k\)+1 prime raised to an even power (\(3^2\)) and two 4\(k\)+1 primes (5 and 157). This means that it can be expressed as a sum of two squares in two different ways, viz.:$$ \begin{align} \textbf{28260} &= 6^2+168^2\\ \textbf{28260} &= 96^2+138^2 \end{align} $$PROPERTY 2: a, b, c, d number

It is what I've termed an \(a, b, c, d\) number because its digits can be rearranged to form three different numbers with the property that \(a+b+c=d\) where all four numbers share identical digits. In this case, there are two possible arrangements:$$ \begin{align} 26082 + 26280 + \textbf{28260} &= 80622\\ 26280 + 28062 + \textbf{28260} &= 82602 \end{align} $$PROPERTY 3: d-powerful number

It is digitally powerful (or \(d\)-powerful) because it can be expressed as a sum of positive powers of its digits. Here we have:$$ \textbf{28260} = 2^{14} + 8^4 + 2^2 + 6^5 + 0$$Of additional interest is that this number is the beginning of chain of ten consecutive numbers with this property. See Figure 1.


Figure 1


PROPERTY 4: Ulam number

It is an Ulam number. The Ulam sequence is defined by \(U_1=1\), \(U_2=2\)  and, for \(k>2\), \(U_k\) is the smallest integer that can be written in exactly one way as \(U_i+U_j\) with \(i<j<k\). Here we have:$$ \textbf{28260}=3 + 28257$$PROPERTY 5: gapful number

It a gapful number defined as a number of at least 3 digits that is divisible by the number formed by its first and last digits. Here the first and last digits form the number 20 and 20 is indeed a divisor:$$ \frac{ \textbf{28260}}{20} = 1413$$PROPERTY 6: untouchable number

It is an untouchable number defined as a number \(n\) that is not the sum of the proper divisors of any number \(k\). In other words:$$ \textbf{28260} \neq \sigma(k)-k \text{ for any }k $$PROPERTY 7: inconsummate number

It is an inconsummate number defined as a number \(n\) for which there is no number $k$ such that \(k\) divided by its sum of digits (SOD) gives $n$. Thus we have:$$ \frac{k}{\text{SOD}(k)}\neq \textbf{28260} \text{ for any } k$$PROPERTY 8: tau number

is a tau number since it is divisible by its number of divisors. Here there are 36 divisors and we have:$$ \frac{\textbf{28260}}{36}=785$$PROPERTY 9: Harshad number

It is a Harshad number defined as number that is divisible by the sum of its digits. Here we have a sum of digits of 18 and:$$ \frac{\textbf{28260}}{18}=1570$$PROPERTY 10: zeroes of the Mertens function

It is a number where the Mertens function has a value of zero. It forms a pair of consecutive numbers with 28259.

I examined the Möbius and Mertens functions in a post titled The Möbius Function and Mertens Function on January 25th 2020. In number theory, we define the Mertens function as:$$M(n) = \sum_{1\le k \le n} \mu(k)$$where \( \mu (k)\) is the Möbius function. For any positive integer n, \(μ(n)\) has values in {−1, 0, 1} depending on the factorisation of \(n\) into prime factors:$$\mu(n) = \begin{cases} 1 & \quad \text{if } n \text{ is square-free + integer with even number of prime factors}\\ -1 & \quad \text{if } n \text{ is square-free + integer with odd number of prime factors}\\ 0 & \quad \text{if } n \text{ has a squared prime factor} \end{cases}$$Figure 2 shows the situation:

Figure 2

There are many other properties that the number has but this covers most of the more interesting.

Wednesday, 20 November 2024

A Plethora Of Squares

The number associated with my diurnal age today, 27625, has the unique quality that it is the smallest number capable of being expressed as a sum of two squares in exactly eight different ways. Here are the different ways:$$ \begin{align} 20^2+ 165^2 &= 27625\\27^2+ 164^2 &= 27625\\45^2+ 160^2 &=27625\\60^2+ 155^2 &=27625\\83^2+ 144^2 &=27625\\88^2+ 141^2 &= 27625\\101^2+ 132^2 &=27625\\115^2+ 120^2 &=27625 \end{align}$$The number arises from 27625's factorisation where:$$27625 = 5^3 \times 13 \times 17$$To determine the number of ways in which it can be written as the sum of two squares, we add 1 to each index, multiply them together and divide the product by 2. If the product is not even, then we round the result up. In the case of 27625 we have:$$ \begin{align} \frac{(3 +1) \times (1 +1) \times (1+1)}{2} &= \frac{4 \times 2 \times 2}{2} \\ &=8 \end{align}$$This property of 27625 qualifies it for membership in OEIS A016032:


 A016032: least positive integer that is the sum of two squares of positive integers in exactly \(n\) ways.

The initial members of the sequence are:

2, 50, 325, 1105, 8125, 5525, 105625, 27625, 71825, 138125, 5281250, 160225, 1221025, 2442050, 1795625, 801125, 446265625, 2082925, 41259765625, 4005625, 44890625, 30525625, 61051250, 5928325, 303460625, 53955078125, 35409725, 100140625, 1289367675781250

It can be noted that the sequence is not monotonic increasing. For example, 8125 is the smallest number that can be expressed as a sum of two squares in exactly five ways but 5525 is the smallest number that can be expressed as a sum of two squares in exactly six ways.

Now if we square 27625 we have the following factorisation:$$27625^2=5^6 \times 13^2 \times 17^2$$Now this number can be expressed as a sum of two squares in 32 different ways. These are the possible ways:$$ \begin{align} 0^2+ 27625^2 &= 27625^2\\969^2+ 27608^2 &=27625^2\\1175^2+ 27600^2 &=27625^2\\2625^2+ 27500^2 &=27625^2\\3060^2 +27455^2 &=27625^2\\ 3588^2+ 27391^2 &=27625^2\\ 4225^2+27300^2 &=27625^2\\5180^2+ 27135^2 &=27625^2\\5655^2+ 27040^2 &=27625^2\\6600^2+ 26825^2 &=27625^2\\6800^2+ 26775^2 &=27625^2\\7223^2+ 26664^2 &=27625^2\\7735^2+ 26520^2 &=27625^2\\8856^2+ 26167^2 &=27625^2\\9724^2+ 25857^2 &=27625^2\\10220^2+ 25665^2 &=27625^2\\10625^2+ 25500^2 &=27625^2\\10815^2+ 25420^2 &=27625^2\\11700^2+ 25025^2 &=27625^2\\12137^2+ 24816^2 &=27625^2\\13000^2+ 24375^2 &=27625^2\\13847^2+ 23904^2 &=27625^2\\14025^2+ 23800^2 &=27625^2\\14400^2+ 23575^2 &=27625^2\\15620^2 +22785^2 &=27625^2\\16575^2+ 22100^2 &=27625^2\\17340^2+ 21505^2 &=27625^2\\17500^2+ 21375^2 &=27625^2\\18239^2+ 20748^2 &=27625^2\\18600^2+ 20425^2 &=27625^2\\18921^2+ 20128^2 &=27625^2\\19305^2+ 19760^2 &=27625^2 \end{align}$$Once again, we know that there are 32 ways to write this number as a sum of two squares because looking at the indices again we have:$$\begin{align} \frac{(6+1) \times (2+1) \times (2+1)}{2} &= \frac{7 \times 3 \times 3}{2}\\ &= \frac{63}{2}\\ &\rightarrow 32 \text{ rounded up} \end{align}$$Now this property of the square of 27625 qualifies it for membership in OEIS A097244:


A097244: numbers \(n\) that are the hypotenuse of exactly 31 distinct integer-sided right triangles, i.e., \(n^2\) can be written as a sum of two squares in 31 ways.

By 31 ways and not 32 ways is meant that the number can be written a sum of two distinct non-zero numbers in 31 ways. The initial members of this sequence are:

27625, 47125, 55250, 60125, 61625, 66625, 78625, 82875, 86125, 87125, 94250, 99125, 110500, 112625, 118625, 120250, 123250, 129625, 133250, 134125, 141375, 144625, 148625, 155125, 157250, 157625, 164125, 165750, 172250, 174250, 177125

As can be seen, 27625 is the first member of this sequence. 

Monday, 17 June 2024

What's Special About Palindrome 27472?


Palindromic numbers occur every century during a millenium and the millenium I'm focused on stretches from 27000 to 27999. Because the first two digits of numbers in this millenium add to 9, the palindromes that arise have the peculiarity that the middle digit is always the arithmetic digital root, with the exception of 27072. Thus we have:

  • 27172 with digital root of 1
  • 27272 with digital root of 2
  • 27372 with digital root of 3
  • 27472 with digital root of 4
  • 27572 with digital root of 5
  • 27672 with digital root of 6
  • 27772 with digital root of 7 
  • 27872 with digital root of 8 
  • 27972 with digital root of 9
  • I'll soon be 27472 days old and I've gotten into the habit of creating a post for each palindromic day. So what other special properties does this palindrome have? 

    • It is a palindrome in base 9 as well $$27472_{10} \rightarrow 41614_{ \, 9}$$This qualifies it for membership in OEIS A180454: numbers that are 5-digit palindromes in at least two bases.

    • It is a d-powerful number, because it can be written as $$27472=2^3 + 7^4 + 4^3 + 7^5 + 2^{13} $$
    • It can be written as a sum of two squares in two different ways because it is a product of a power of 2 and two 4k+1 primes:$$ \begin{align} 27472 &= 2^4 \times 17 \times 101\\ &=24^2+ 164^2\\ &=56^2+ 156^2 \end{align}$$
    •  27472 is an untouchable number, because it is not equal to the sum of proper divisors of any number.

    • 27472 is a palindrome with exactly six prime factors (counted with multiplicity) and this qualifies it for membership in OEIS A046332 whose members, up to 40000, are:

      2772, 2992, 6776, 8008, 21112, 21712, 21912, 23632, 23832, 25452, 25752, 25952, 27472, 28782, 29392

    • 27472 is a palindrome which is even and in which the parity of digits alternates. This qualifies it for membership in OEIS A030149. The initial members are:

      0, 2, 4, 6, 8, 212, 232, 252, 272, 292, 414, 434, 454, 474, 494, 616, 636, 656, 676, 696, 818, 838, 858, 878, 898, 21012, 21212, 21412, 21612, 21812, 23032, 23232, 23432, 23632, 23832, 25052, 25252, 25452, 25652, 25852, 27072, 27272, 27472

    • The Collatz Trajectory for 27472 is:
    27472, 13736, 6868, 3434, 1717, 5152, 2576, 1288, 644, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1

    There are 108 steps required to reach 1. Figure 1 shows a plot of the numbers using a logarithmic scale for the vertical axis. 
     

    Figure 1

    27472, 29444, 25240, 31640, 50440, 73040, 114448, 117680, 156112, 174224, 163366, 121862, 81418, 40712, 46648, 61352, 53698, 26852, 28210, 36302, 25954, 15086, 8794, 4400, 7132, 5356, 4836, 7708, 6404, 4810, 4766, 2386, 1196, 1156, 993, 335, 73, 1, 0

                Figure 2 shows a plot of these numbers. 


    Figure 2

    3, 5, 7, 9, 11, 15, 27, 32, 33, 37, 45, 47, 55, 99, 111, 135, 165, 167, 185, 297, 329, 333, 407, 495, 544, 555, 999, 1169, 1221, 1485, 1665, 2035, 3232, 3663, 4995, 6105, 7849, 10989, 18315 
    27472, 54945, 50985, 92961, 86922, 75933, 63954, 61974, 82962, 75933 
    • The number of steps required is to reach home prime is 5 :
      • 27472
      • 222217101
      • 333310925169
      • 3365956198099
      • 1111271910230901
      • 3419034730977487
    • The multiplicative persistence of 27472 is as follows: 27472, 784, 224, 16, 6

    • 27472 is a Zumkeller number, because its divisors can be partitioned in two sets with the same sum (28458). There are many such partitions, one example of which is:

      [8, 34, 136, 808, 27472] and [1, 2, 4, 16, 17, 68, 101, 202, 272, 404, 1616, 1717, 3434, 6868, 13736] both of which sum to 28458

      The divisors of 27472 are 1, 2, 4, 8, 16, 17, 34, 68, 101, 136, 202, 272, 404, 808, 1616, 1717, 3434, 6868, 13736 and 27472.
    • 27472 has Odds and Evens Trajectory of length 1 and is 27472, 27478, 27478

    • 27472 is a pseudoperfect number because it is the sum of a subset of its proper divisors. There are many such subsets one of which is [101, 1616, 1717, 3434, 6868, 13736]. Permalink.

    • 27472 is a practical number, because each smaller number is the sum of distinct divisors of 27472.  For example, take an arbitrary number like 23891. It can expressed as the sum of distinct divisors of 24742 in several different ways e.g. the sum of 1, 17, 68, 272, 404, 808, 1717, 6868 and 13736.

    • 27472 is of course an abundant number, since it is smaller than the sum of its proper divisors (29444).

    27472 has the property, shared by all the numbers in its decade, that its digit sum is given by the concatenation of its first and last digit, here 22. Thus:
    • 27470 has digit sum 20 
    • 27471 has digit sum 21 
    • 27472 has digit sum 22
    • 27473 has digit sum 23 
    • 27474 has digit sum 24 
    • 27475 has digit sum 25 
    • 27476 has digit sum 26 
    • 27477 has digit sum 27 
    • 27478 has digit sum 28 
    • 27479 has digit sum 29
    This permalink will generate a list of all 1230 numbers in the range up to 40000. However, there are only 13 palindromes with this property and they are 191, 2992, 10901, 11711, 12521, 13331, 14141, 25852, 26662, 27472, 28282, 29092 and 39993.

    Under Conway's Game of Life rules, the 27472 shape shown at the beginning of this blog stabilises after about 914 generations to the shapes shown in Figures 3 and 4 with the paths of the five gliders visible in Figure 4.


    Figure 3


    Figure 4

    Saturday, 26 March 2022

    Dream Numbers

    This post is a little different from my usual content that is often prompted by an analysis of the number associated with my diurnal age. This post is prompted by a dream that I had involving a shipping container that, unlike most such containers, was gun metal in colour. It seemed totally sealed but I found a tiny opening and lit a match (or used the torch on my phone) to peer within. I saw a woman peering back at me.

    She invited me in and the front face of the container disappeared so that access was now possible. She said that there were 37 people inside. Two of those were adolescent boys, one noticeably shorter than the other. It seemed that one of them was 17 but I wasn't sure which one. I pointed to the taller boy and then, quite audibly in my dream, said "seventeen?". The woman, and the mother of the two boys, smiled and clarified the situation. She said that they were twins (clearly not identical) and had been born on a Saturday. They were both 17.

    After some thinking about these numbers, I realised that both 17 and 37 are 4\(k\)+1 primes and thus form the hypotenuse of right angled triangles with associated integer sides, connected by Pythagoras' Theorem:$$ \begin{align} 17^2&=8^2+15^2\\37^2&=12^2+35^2 \end{align}$$Thus we end up with a set of six numbers:$$8, 12, 15, 17, 35, 37$$Being 4\( k\)+1 primes of course, we can also write:$$ \begin{align} 17&=1^2+4^2\\37&=1^2+6^2 \end{align}$$This generates a set of five numbers:$$1, 4, 6, 17, 37$$I tend to go with the set of six numbers as they are easily associated with the Saturday night draw in the Australian lottery system. 

    Being in Indonesia, I can't participate in this lottery, not even using a VPN, so I passed these numbers on to my daughter-in-law who lives in Melbourne. I suggested that she try them out. Whether she does or doesn't, I'll report back on what numbers came up in the Saturday night draw at the end of this post. I won't make the post public until after Saturday night in case anyone tries to "cash in" on my dream numbers!

    LATE SATURDAY NIGHT

    Well my daughter-in-law did submit the six numbers and, not surprisingly, my dream numbers did not prove precognitive. In fact I only succeeded in selecting one of the winning numbers and therefore not even a minor prize was won. See Figure 1. Nor did my other possible numbers (1, 4 and 6) make an appearance. Of course, the numbers could have been meant for Saturday April 2nd, the day before my birthday and a day that marks the 73rd solar return (when the Sun returns to the exact position that it occupied at the time of my birth).

    Figure 1

    Here are links to my two previous posts on the mathematics of Lotto:
    Of course the numbers 17 and 37 that I dreamed of may have had nothing to do with Lotto. In fact, Figure 2 gives an insight into a completely different interpretation of the numbers.


    Figure 2

    A shipping container is characterised by its square cross-section and so the 17 could refer to the side of this square and the 37 could refer to its length of the prism. Only two numbers are needed to define its dimensions.  When the front of the container is open and you look at it front on, the far end seems to be smaller than the open front end.  This corresponds to the twins being both 17 and yet one appearing larger than the other. 
    What are the characteristics of this 17 x 17 x 37 rectangular prism? It has a volume of 10693 cubic units and a surface area of 3094 square units. If the front end is open, then the surface area is 2805 square units. How Saturday fits in with this view of things I don't know. Saturday is the sixth day of the week if we count Monday as 1, Tuesday as 2 etc. A rectangular prism does indeed have six sides.

    Saturday is Saturn's day and each planet has an associated magic square. The one for Saturn is shown in Figure 3. The numbers associated with Saturn are 3, 9, 15 and 45 because the magic square is 3 x 3, there are 9 squares, the numbers in each row, column and main diagonal add to 15 and the total of all nine numbers is 45.

    Figure 3

    I've written about magic squares before. Here are links to these posts:
    Other sources quote Saturn as being associated with the number 8. See Figure 4.


    Figure 4: source


    I seem to be going off on a tangent here so I'll stop. It has occurred to me that 17 and 37 are both reversible primes since 71 and 73 are also prime. Currently, at age 72, I'm stuck between these two primes although in less than two weeks I'll be 73. 

    Let's not forget that 71 and 73 are also twin primes which fits in very nicely with the twin element in the dream. Additionally, my 73rd solar return occurs on April 2nd 2022, a Saturday. The solar return marks the return of the Sun to the same zodiacal position (12°47'07" Aries) at the time of my birth. My birthday actually occurs on April 3rd.

    The shipping container may just be a symbolic representation of life on the physical plane. I am reminded of Carl Jung's description of his Near Death Experience in his autobiography "Memories, Dreams, Reflections" :

    In reality, a good three weeks were still to pass before I could truly make up my mind to live again. I could not eat because all food repelled me. The view of city and mountains from my sick-bed seemed to me like a painted curtain with black holes in it, or a tattered sheet of newspaper full of photographs that meant nothing. Disappointed, I thought, "Now I must return to the 'box system' again." For it seemed to me as if behind the horizon of the cosmos a three-dimensional world had been artificially built up, in which each person sat by himself in a little box. And now I should have to convince myself all over again that this was important! Life and the whole world struck me as a prison, and it bothered me beyond measure that I should again be finding all that quite in order. I had been so glad to shed it all, and now it had come about that I along with everyone else would again be hung up in a box by a thread.

    He continued:

    It is impossible to convey the beauty and intensity of emotion during those visions. They were the most tremendous things I have ever experienced. And what a contrast the day was: I was tormented and on edge; everything irritated me; everything was too material, too crude and clumsy, terribly limited both spatially and spiritually. It was all an imprisonment, for reasons impossible to divine, and yet it had a kind of hypnotic power, a cogency, as if it were reality itself, for all that I had clearly perceived its emptiness. Although my belief in the world returned to returned to me, I have never since entirely freed myself of the impression that this life is a segment of existence which is enacted in a three-dimensional boxlike universe especially set up for it.

    So perhaps my dream primes 17 and 37 are meant to be interpreted as the twin primes 71 and 73 with Saturday April 2nd marking my astrological coming of age 73. I realise I'm straying too far into the metaphysical here and it would be better to continue this train of thought in my blog "Mystical Meanderings".

    Saturday, 13 July 2019

    The Connectivity of Numbers

    Figure 1
    I thought it time to summarise what I've learned thus far about the number properties that I'll term intrinsic. By this term, I mean number properties that are not dependent on the number base used to represent the number. For example, 25652 is a palindromic number in base 10 but Figure 1 shows that this is not the case for the other bases from 2 to 16. Examples of intrinsic number properties would be the number of prime factors and the number of divisors. For example, 25652 factors to \(2^2 ⋅ 11^2 ⋅ 53\) and it has 18 divisors (1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826 and 25652). These factors and divisors are the same numbers in any number base.

    The sum of the digits of a number is another example of a number property that is not intrinsic. In the case of 25652, the digit sum is 20. However, in base 8 the number is 62064 and the digit sum is \(22_8\), which is 18 in base 10. Contrast this with the sum of the prime factors of 25652 in bases 10 and 8 (ignoring multiplicity). In base 10, the sum is 66. In base 8, the factors are \(2_8\), \(13_8\) and \(65_8\) and so the sum is \(102_8\) or 66 in base 10. So having clarified the difference between intrinsic and base-dependent number properties, what are some of the most important properties of the former type of numbers?

    I'll continue using 25652 as an example. To begin the divisors, and particularly the prime divisors, are all important. For 25652, as already noted, the divisors are:$$1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826, 25652$$The prime divisors are \( 2, 2, 11, 11, 53 \) and these uniquely define the number. 25652 has an interesting property that does not relate to its own divisors but instead relates to the proper divisors of other numbers. 25652 is an untouchable number, because it is not equal to the sum of proper divisors of any number. The proper divisors of 25652 are 1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826 and these add to 25137. This means that 25137 is not an untouchable number because it can be formed from the addition of the proper divisors of 25652. This talk of adding up divisors leads us on to the sigma function.

    The sigma function can be used to find the number of divisors, the sum of these divisors, the sum of the squares of these divisors, the sum of the cubes of these divisors and so on. So-called sigma zero, written as \( \sigma_0\), returns the number of divisors or the sum of the divisors raised to the zero power. \( \sigma_1\) returns the sum of the divisors raised to the first power and so on. This is the result:

    \( \sigma_0(25652)=18\)
    \( \sigma_1(25652)=50274\)
    \( \sigma_2(25652)=871164630\)
    \( \sigma_3(25652)=19267967775942\)
    Also of interest is the count of numbers that are relatively prime to 25652 where 1 is regarded as being relatively prime to all numbers. This is known as the totient of the number and can be written as \( \phi=11440 \). All multiples of 2, 11 and 53 (and 25652 itself) will be excluded from this count. For prime numbers, the totient will always be one less than the number itself. For example, 25667 is prime and its totient is 25666.

    Moving along, we note that some numbers are so-called square numbers. An example of such a number is 25600 which is equal to the square of 160. Visually, this number could be represented as shown in Figure 2.

    Figure 2

    In the case of 25652, it is not a square number but it can be represented a sum of two squares, since$$25652=23716 + 1936 = 154^2 + 44^2 $$So, visually, the number could be represented as shown in Figure 3:

    Figure 3

    Only certain numbers can be represented as a sum of two squares. If a number has a 4k+3 prime factor that is raised to an odd number (1, 3, 5, .. ), then it cannot be represented as a sum of two squares. Most numbers can be represented as sum of three squares, provided that there is not a remainder of 7 when the number is divided by 8. 25652 gives a remainder of 4 when divided by 8 and it can be represented as a sum of three squares in 20 different ways as shown in Figure 4:

    Figure 4
    Figure 5

    Visually, the nineteen triplets in Figure 4 that contain no zeroes, could be used as the sides of three squares, to represent 25652. The same approach can be used for cubes. For example:$$25665=11^3+23^3+23^3$$Rather less frequently, a number can be represented as a sum of two cubes. For example:$$25720 = 11^3 + 29^3 $$Such numbers can be envisaged as comprising three cubes (in the case of 25665) or two cubes (in the case of 25720). See Figure 5 for a not-to-scale representation of 25720.

    In my previous post, I considered the seed numbers that would be needed to make a number a part of a Fibonacci sequence. In the case of 25652, these numbers would be 52 and 146, producing the sequence:$$25652,15854,9798,6056,3742,2314,1428,886,542,344,198,146,52$$Similarly, the three seed numbers for 25652 to be part of a tribonacci sequence are 10, 30 and 63, producing the sequence:$$25652,13947,7583,4122,2242,1219,661,362,196,103,63,30,10$$So I could go on but I'll leave off there and try to summarise things via Figure 6.

    Figure 6

    Saturday, 7 April 2018

    Finding Significance in Insignificant Numbers

    Sometimes in my examination of the numbers that measure my diurnal age, I come across a number with few entries in the OEIS and all of them inscrutable to my limited intellect. 25197 was a case in point. I wrote about this in an earlier post and what I found in the case of that number was that its square (634888809) contained four consecutive 8's. As such, it belonged to an as yet unidentified sequence of numbers with the common property that their squares contained a sequence of four or more 8's. These numbers are shown below:


    This is the sequence that I submitted to the OEIS for approval and I'm still waiting to see it published. This example illustrates that apparently insignificant numbers can contain significance that just needs to be unlocked.

    Thus we come to today's number, 25206, that is significant in that it marks a point where there is a balance struck between the number of 4k+1 primes and the number of 4k+3 primes. Prime 617249 marks a point where there are exactly 25206 primes of each sort. While this is clearly significant, the problem is that it's shared with many other nearby numbers as can be seen from this extract from OEIS A092198:
    0, 1, 3, 6, 44, 1471, 1472, 1473, 1474, 1475, 1476, 25185, 25187, 25188, 25189, 25190, 25196, 25206, 25211, 25212, 25213, 25214, 25215, 25216, 25217, 25218, 25219, 25222, 25224, 25225, 25251, 25253, 25257, 25258, 25410, 25421, 25426, 25427, ...
    Note particularly the gap between 1476 and 25185 (the next member in the sequence). These balance points in the number of 4k+1 and 4k+3 primes clearly exist in clusters. This is the reason that I was looking for something different when examining 25206. It's clear that the number cannot be the sum of two squares because the number factors to 2×3×4201 and there is a 4k+3 prime (3) raised to an odd power (3). However, I wondered if there is an integer solution to the equation \( x^2+2y^2=25206 \) even though there is no integer solution to \( x^2+y^2=25206 \). It turns out there are two, x=158, y=11 and x=38, y=109. This is shown geometrically in the diagram below where the solutions, for positive numbers only, are represented on an ellipse.


    The frequency of integer solutions to \( x^2+2y^2=N \) seems about equal to that of  \( x^2+y^2=N \), at least judging by a quick count. For example, over the next twenty integers (25206 to 25216), there are six numbers (25211, 25218, 25219, 25222, 25224, 25225) that can be represented in the form \( x^2+2y^2 \) and six numbers (25209, 25210, 25216, 25220, 25225, 25226) that can be represented in the form  \( x^2+y^2 \). 

    From this admittedly quick count, it would seem that about 30% of numbers can be represented as a sum of two squares and another 30% as a sum of a square and twice a square. There is possibly no overlap between the two sets and so it would seem that if a number cannot be represented as a sum of two squares then it may well be possible to represent it as a sum of a square and twice a square. 

    This line of enquiry opens up all sorts of intriguing questions such as:
    • is it possible to represent a number in both the form \( x^2+y^2 \) and \( x^2+2y^2 \)?
    • is it possible to represent all numbers in the form \( ax^2+by^2 \) where \( a \) and \( b \) are positive integers?

    Friday, 24 February 2017

    Sums of Squares Revisited

    My first post for this mathematics blog concerned the conditions required for a number to be expressible as the sum of two squares. The date was 26th September 2015. I thought I might start revisiting some of my earlier posts just to reacquaint myself with their content. Let's consider prime numbers first. Fermat's theorem on the sums of two squares states that any prime number that is congruent to 1 modulus 4 can be expressed as a sum of two squares.

    In other words, if \(p\) is a prime, then \(p=x^2+y^2\) where \(x\) and \(y\) are integers, if and only if \(p \equiv 1 \pmod{4}\). Applied to my current day count of \(24799\) (a prime), we find that \(24799 \equiv 3 \pmod{4}\) and so it cannot be written as the sum of two squares. In fact, it cannot even be written as the sum of three squares because the number can be expressed in the form \(4^a(8b+7)\) with \(a=0\) and \(b=3099\). By Legendre's 3-square theorem, such a number cannot be expressed as a sum of three squares.

    Primes that can be expressed as the sum of two squares are called Pythagorean Primes.

    If the number is composite, none of its \(4k+3\) primes can have an odd exponent. For example, two days ago I was \(24797\) days old and this number factorises to \(137 \times 181\). Now \(137 \equiv 1 \pmod{4}\) and \(181 \equiv 1 \pmod{4}\), so there are no \(4k+3\) primes and thus the number is expressible as a sum of two squares (in two different ways as it turns out): \(24797=59^2+146^2=74^2+139^2\).

    There is a reason that \(24797\) can be expressed as a sum of squares in two different ways. Remember that its factors \(137\) and \(181\) are both primes satisfying \(p \equiv 1 \pmod{4}\) and so each can be expressed as a sum of two squares. Specifically, \(137=4^2+11^2\) and \(181=9^2+10^2\). It can easily be shown that the product of two sums of squares is equal to a sum of squares in two different ways. Here is the demonstration: $$(a^2+b^2)(c^2+d^2)=(ac-bd)^2+(ad+bc)^2=(ac+bd)^2+(ad-bc)^2$$There is an interesting history attached to this identity:
    It is actually first found in Diophantus' Arithmetica (III, \(19\)), of the third century A.D. It was rediscovered by Brahmagupta (\(598\)–\(668\)), an Indian mathematician and astronomer, who generalised it (to the Brahmagupta identity) and used it in his study of what is now called Pell's equation. His Brahmasphutasiddhanta was translated from Sanskrit into Arabic by Mohammad al-Fazari, and was subsequently translated into Latin in \(1126\). The identity later appeared in Fibonacci's Book of Squares in \(1225\). Source.
    However, take yesterday's number \(24798=2 \times 3 \times 4133\). Clearly, \(3\) is a \( 4k+3\) prime raised to an odd power and so \(24798\) cannot be expressed as sum of two squares. As it happens, \(4133 \equiv 1 \pmod{4}\) but that doesn't matter because \(3\) has already ruined things.

    Monday, 11 January 2016

    Cubic Numbers

    Today, January 11th 2016, I'm 24389 days old and what's special is that this number is 29 cubed or 29 x 29 x 29. Days like this are rare. For example, \(28^3 \) or 21592 occurred on May 10th 2009 and \(30^3 \) or 27000 will occur on March 6th 2023. Cubes of prime numbers are even rarer of course. The prime preceding 29 is 23 and \(23^3 \) or 12167 occurred on July 26th 1982. The prime following 29 is 31 and \( 31^3 \) or 29791 will occur on October 26th 2030 when I'm 81 years of age (if I make it that far). 

    24389 has a surprisingly large number of entries in the Online Encyclopaedia of Integer Sequences (OEIS), 174 in fact which is unusual for a composite number of this magnitude. The first entry is for OEIS A000578: the cubes \( a(n) = n^3 \). The sequence, up to 24389 when n=29, looks like this:

    0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 15625, 17576, 19683, 21952, 24389

    The next entry is OEIS A030078: cubes of primes. The sequence, up to 24389, is: 8, 27, 125, 343, 1331, 2197, 4913, 6859, 12167, 24389.

    From WolframAlpha, we find that 24389 is also a cube that is expressible as the sum of two squares in two different ways: 

    \(24389 = 58^2+145^2  = 65^2+142^2 \)

    Additionally, we find that 24389 is the hypotenuse of a primitive Pythagorean triple: 
      \(24389^2 = 15939^2+18460^2 \). So, all in all, an interesting number.

    Sunday, 27 September 2015

    Sum of Two Squares


    Figure 1

    I'm currently reading the book whose cover appears in Figure 1. As the title suggests, the author just deals with the numbers from \(1\) to \(9\). While some of the topics are a little inaccessible, the majority are understandable and several of them I'll be revisiting in subsequent posts.

    I'll address one of the topics here and now however, and this one concerns the conditions necessary for a prime number to be expressed as a sum of two squares. Fermat's theorem on the sums of two squares states that any prime number that is congruent to 1 modulus 4 can be expressed as a sum of two squares. Another way of expressing this is to say that the prime can be represented as \(4k+1\) for some \(k \geq 1\). 

    The first instance of such a prime is 5, corresponding to \(k=1\), and it can be expressed as \(2^2+1^2 \). When \(k=3\), we have the prime 13 and it can be expressed as \(3^2+2^2\). My last prime day is another example and is expressible as: \(24281= 16^2+155^2\). 

    However, what if the number is composite? It appears that the condition in that case is that none of the \(4k+3\) primes can have an odd exponent. For example, \(21=3 \times 7 \) with both 3 and 7 being of the form \(4k+3\) with \(k=0\) and \(k=1\) respectively. Both are raised to the odd power 1 and thus 21 cannot be written as a sum of two squares.

    However, \(45=3^2 \times 5 \) and, though 3 is a factor, it is raised to an even power. Thus 45 can be written as a sum of two squares, specifically \(6^2+3^2\). A larger composite number is \(24274=2 \times 53 \times 229\) and it is expressible as a sum of two squares in two ways, namely \(24274=57^2+145^2\) and \(93^2+125^2\). In this case, none of the prime factors is of the \(4k+3\) variety.

    To determine in how many ways a number can be written as a sum of two squares, all that needs to be done is to:
    • add 1 to the index of each 4\(k\)+1 factor
    • multiply these new indices together
    • divide the product by 2
    • if the product is an odd number, then round up
    If 2 or a power of 2 is present, it has no effect and, as we said, all \(4k+3\) factors must be raised to even powers. In the case of 24274, the indices of 53 and 229 are 1 and 1 respectively which become 2 and 2. Multiplying 2 by 2 and dividing by 2 gives 2 and thus its representation as a sum of two squares in two different ways.

    In the case of a number that is a perfect square \(n\), the trivial \(0^2+(\sqrt(n))^2\) is also included as a solution. For example, consider 25 = 5 * 5. The rule again gives 2 by 2 divided by 2 and so there are two ways to express the number as a sum of two squares. One way is \(3^2+4^2\) and the other way is \(0^2+5^2\).

    As a further example, consider the perfect square:$$ \begin {align} 710222500 &=26650^2\\ &=2^2 \times 5^4 \times 13^2 \times 41^2 \end{align}$$This number has \(4k+1\) indices of 4, 2, 2 which become 5, 3, 3 when 1 is added. The product is 45 which, when divided by 2 and rounded up, becomes 23. So there are 22 ways in which the number can be expressed a sum of two positive integers and the other way is as \(0^2+26650^2\).

    on December 19th 2020, December 22nd 2021 and March 21st 2022

    This future post in May 2018 collects a variety of posts (including this one) 
    that relate to the topic of the sums of squares.