Tuesday 31 July 2018

Sums of Cubes and Squares of Sums

Today I turned 25321 days old, a prime number of days, and a prime with the property that the sum of the cubes of its digits equals the square of the sum of its digits. In other words:$$2^3+5^3+3^3+2^3+1^3 = (2+5+3+2+1)^2 = 169$$This prime is a member of OEIS A225567: Primes with nonzero digits such that sum of cubes of digits equal to square of sums. It's initial members are:$$1423, 2143, 2341, 4231, 12253, 21523, 22153, 22531, 23251, 25321, ...$$Serendipitously I then rediscovered the old and famous connection between the sum of the cubes of the first n natural numbers and the square of the sum of these some numbers, specifically:$$ \sum_1^n i^3=\big (\sum_1^n i \big)^2$$It's easy to see why the first four members of the sequence (1423, 2143, 2341 and 4231 are members) because these are simply instances of:$$1^3+2^3+3^3+4^3=(1+2+3+4)^2$$I also discovered a similar relationship involving the divisors \(d_i \) of any natural number with \(n\) divisors, namely that:$$ \sum_1^n (\sigma_0(d_i))^3=\big(\sum_1^n \sigma_0(d_i) \big) ^2$$The previous looks more difficult than it actually is and a simple example will assist. Let's consider the number 10. It has four divisors 1, 2, 5 and 10. Each of these divisors has 1, 2, 2 and 4 divisors respectively. We find that:$$1^3+2^3+2^3+4^3=(1+2+2+4)^2 = 81$$It's as simple as that and it applies to every natural number. Of course 1224 and permutations of these digits can be found in OEIS A227073: Positive numbers without the digit 0 such that sum of cubes of the digits equals the square of the sum of the digits. The initial members of this sequence are:$$ 1, 12, 21, 22, 123, 132, 213, 231, 312, 321, 333, 1224, ...$$

Monday 30 July 2018

Practical Numbers

Today I turned 25320 days old but I accidentally entered 25230 into the OEIS and discovered that it was a practical number, specifically one that formed the central member of a triple of practical numbers. It is a number \(n\) such that \(n-2\), \(n\), \(n+2\) are all practical numbers (OEIS A287682). So in this case, the other members of the triple are 25228 and 25232. This is not a common occurrence as can be seen by the initial members of the sequence:
4, 6, 18, 30, 198, 306, 462, 702, 1482, 2550, 3330, 4422, 5778, 6102, 6498, 9042, 11178, 11778, 14418, 15498, 17298, 17442, 19458, 20862, 21582, 22878, 23322, 23550, 25230, ...
This led me to investigate what characterised a practical number and during that process I realised that I'd wrongly entered my number of the day. However, as it turns out 24320 is also a practical number but not a member of a triplet (the next entry in OEIS A287682 is 26622). I was encouraged to continue my investigations. According to Wikipedia:
In number theory, a practical number or panarithmic number is a positive integer \(n\) such that all smaller positive integers can be represented as sums of distinct divisors of \(n\). For example, 12 is a practical number because all the numbers from 1 to 11 can be expressed as sums of its divisors 1, 2, 3, 4, and 6: as well as these divisors themselves, we have 5 = 3 + 2, 7 = 6 + 1, 8 = 6 + 2, 9 = 6 + 3, 10 = 6 + 3 + 1, and 11 = 6 + 3 + 2.
The practical numbers themselves are rather frequent. OEIS A005153 lists these initial practical numbers:
1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 66, 72, 78, 80, 84, 88, 90, 96, 100, 104, 108, 112, 120, 126, 128, 132, 140, 144, 150, 156, 160, 162, 168, 176, 180, 192, 196, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252, ...
As can be seen, all except 1 are multiples of 2 and this is one condition for a number being practical. The fully rigorous statement of what determines a practical number would be:

A positive integer greater than one with prime factorisation
\(n=p_1^{\alpha_1} \dots p_k^{\alpha_k}\) (with the primes in sorted order) is practical if and only if each of its prime factors \(p_i \) is small enough for \(p_i-1 \) to have a representation as a sum of smaller divisors. For this to be true, the first prime \(p_1 \) must equal 2 and, for every \(i \) from 2 to \( k \), each successive prime \(p_i \) must obey the inequality:$$ p_i\leq1+\sigma(p_1^{\alpha_1}p_2^{\alpha_2}\dots p_{i-1}^{\alpha_{i-1}})=1+\prod_{j=1}^{i-1}\frac{p_j^{\alpha_j+1}-1}{p_j-1}$$where \( \sigma(x) \) denotes the sum of the divisors of \(x\). For example, 2 × 3^2 × 29 × 823 = 429606 is practical, because the inequality above holds for each of its prime factors: 3 ≤ \(\ \sigma \)(2) + 1 = 4, 29 ≤ \( \sigma \)(2 × 3^2) + 1 = 40, and 823 ≤ \(\sigma \)(2 × 3^2 × 29) + 1 = 1171.

on August 1st 2021

With some difficulty I developed some SAGE code to calculate the practical numbers contained in a given range. The example at the end of this post is for the range from 26400 to 26500. It includes multiples of 2 because all powers of 2 are practical numbers along with all perfect numbers and primorials. Such numbers are not merely of interest to recreational mathematicians. They are of interest to professional mathematicians because many of their properties are similar to the properties of the prime numbers.

Thursday 26 July 2018

Octonions

I came across this fascinating article in Quanta Magazine (July 20th 2018) about octonions, a concept I'd never heard of before. Here is an excerpt:
The suspicion, harbored by many physicists and mathematicians over the decades but rarely actively pursued, is that the peculiar panoply of forces and particles that comprise reality spring logically from the properties of eight-dimensional numbers called “octonions.”
I knew about the Irish mathematician Hamilton's discovery of quaternions in the mid-nineteenth century and it was John Graves, a lawyer friend of Hamilton’s, (who) subsequently showed that pairs of quaternions make octonions: numbers that define coordinates in an abstract 8-D space.

A 39 year old mathematical physicist at the University of Cambridge by the name of Cohl Furey has been making progress recently connecting the octonions with the Standard Model of Physics. She has posted a series of short videos on YouTube, explaining what she is doing. Shown below is the first of the fourteen videos:


Below is a graphic that summarises some of the differences between the real and complex numbers as well as the quaternions and octonians. Double-click to enlarge. There's no point trying to summarise what's in the article or posting copious extracts. It's better to read it in full and then watch the videos. However, I have included a small quote.
FIGURE !: Four Special Number Systems
To reconstruct particle physics, Furey uses the product of the four division algebras, ⊗ ℂ ⊗ ℍ ⊗ 𝕆 (ℝ for reals, ℂ for complex numbers, ℍ for quaternions and 𝕆 for octonions) — sometimes called the Dixon algebra. 
Whereas Dixon and others proceeded by mixing the division algebras with extra mathematical machinery, Furey restricts herself; in her scheme, the algebras “act on themselves.” Combined as ℝ ⊗ ℂ ⊗ ℍ ⊗ 𝕆, the four number systems form a 64-dimensional abstract space. 
Within this space, in Furey’s model, particles are mathematical “ideals”: elements of a subspace that, when multiplied by other elements, stay in that subspace, allowing particles to stay particles even as they move, rotate, interact and transform. The idea is that these mathematical ideals are the particles of nature, and they manifest the symmetries of ℝ ⊗ ℂ ⊗ ℍ ⊗ 𝕆. 
What's fascinating is the possibility that a number system (the octonions) interacting with other number systems (the reals, complex numbers and quaternions) might be able to describe the existence and behaviour of all the particles and forces in the physical universe.

It will be interesting to follow the progress of Furey's research. Hopefully, she will post more YouTube videos. Her last upload was about nine months ago.

ADDENDUM

Here is a more recent article that relates to octonions titled Ask Ethan: Could Octonions Unlock How Reality Really Works?

Sunday 22 July 2018

Remembering Numbers

What is the best way to remember large numbers? Let's take the following as an example:
638916023694046824309751694343971283440110362656090831218332331634512

FIGURE 1
The Mnemonic Major System (FIGURE 1) is commonly used and the number broken up usually into pairs of digits with an image being associated with each digit pair.

For example, the first pair 63 could be envisaged as chum.

FIGURE 2: chum = 63
Similarly, the second pair of digits 89 could be envisaged as vape.

FIGURE 3: vape = 89
In this way a series of images is built up that can be added to a path in a so-called memory palace. As one traverses this path, the objects appear sequentially and each object can be converted into its equivalent number. This approach of course completely ignores any pattern in the numbers themselves and so it is inherently unappealing to a mathematician. However, is there a better way? There are 69 digits so there are (69+1)/2 = 35 images that need to be created (a leading digit is added to the number to bring the digit count to an even number). Thus we have:

0638916023694046824309751694343971283440110362656090831218332331634512

The first pair of digits is now 06 which converts (say) to sage:


FIGURE 4: sage = 06
The second pair of digits is 38 corresponding to (say) movie. Let's itemise each pair:
  1. 06 --> sage
  2. 38 --> movie
  3. 91 --> abbott
  4. 60 --> shoes
  5. 23 --> gnome
  6. 69 --> chip
  7. 40 --> rose
  8. 46 --> rash
  9. 82 --> fan
  10. 43 --> room
  11. 09 --> soap
  12. 75 --> gull
  13. 16 --> dish
  14. 94 --> bear
  15. 34 --> mary
  16. 39 --> map
  17. 71 --> cat
  18. 28 --> navy
  19. 34 --> emir
  20. 40 --> rice
  21. 11 --> toyota
  22. 03 --> sumo
  23. 62 --> chin
  24. 65 --> chill
  25. 60 --> cheese
  26. 90 --> base
  27. 83 --> foam
  28. 12 --> tiny
  29. 18 --> dove
  30. 33 --> mum
  31. 23 --> annum
  32. 31 --> mat
  33. 63 --> chum
  34. 45 --> really
  35. 12 --> done
It doesn't matter how bizarre the images are, in fact the more bizarre they are the easier it is to remember them. I've practised creating a consecutive sequence of images from the above and I'm now able to recall the 70 digits with a 100% success rate. Next I'll try my hand at recalling 100 digits and beyond.

Tuesday 17 July 2018

Anti-Magic Squares

Today I turned 25307 days old and, as is my habit, I examined the entries for this number in the Online Encyclopaedia of Integer Sequences or OEIS. I've already mentioned 25307 in my previous post as forming part of a prime quadruple consisting of 25301, 25303, 25307 and 25309. For this reason, it is mentioned in OEIS A136721 Prime quadruples: 3rd term.

However, I also came across a mention of the number in OEIS A117560 \(n(n^2-1)/2 - 1\) which at first sight seemed unremarkable. However, on reading further I discovered that the numbers in this sequence form an:
approximation for the lower bound of the "anti-magic constant" of an anti-magic square of order n. The anti-magic constant here is defined as the least integer in the set of consecutive integers to which the rows, columns and diagonals of the square sum
I was of course familiar with magic squares but I'd never heard of anti-magic squares. I was prompted to investigate further.

To quote from WolframAlpha:
An anti-magic square is an \(n×n\) array of integers from \(1\) to \(n^2\) such that each row, column, and main diagonal produces a different sum such that these sums form a sequence of consecutive integers. It is therefore a special case of a heterosquare. It was defined by Lindon (1962) and appeared in Madachy's collection of puzzles (Madachy 1979, p. 103), originally published in 1966.
There are no \(2 \times 2\) or \(3 \times 3\) anti-magic squares. The first occurrence is of a \(4 \times 4 \) anti-magic square and shown below are examples of anti-magic squares from \(4 \times 4\) to \(9 \times 9\):


The formula \(0.5 \times n(n^2-1)-1 \) yields 251 in the case of \(n=8 \) but it should be remembered that this number is a lower bound. There are \( 8 \times 8\) anti-magic squares that start with a higher number. Below is a diagram of an \( 8 \times 8\) anti-magic square showing the various totals from 252 to 269 (as opposed to 251 to 268 in the example above):


In the case of 25307, the value of \(n\) is 37. So the sum of any sequences formed by adding the elements in any row, column or diagonal of this \(37 \times 37\) anti-magic square of numbers have 25307 as their lower bound.

There is a similar sequence for the upper bounds of anti-magic squares. The formula for generating the terms is:$$ \lfloor \frac{n(n^3-n-3)}{2(n-1)} \rfloor $$The OEIS is A117561.

Tuesday 10 July 2018

A Decade to Remember

A decade to remember:

25301     25303     25307     25309

A decade can be defined as:
1. a period of ten years
2. a set, series, or group of ten, in particular
I'll define a decade on the number line as consisting of any group of ten numbers, differing only in their units digits, with the first member ending in 0 and the final member ending in 9. For example, the numbers 40, 41, 42, 43, 44, 45, 46, 47, 48 and 49 would be an example of such a decade. In any decade, only those numbers ending in 1, 3, 7 or 9 can be prime.

The question I asked myself was: in how many decades are all four possible primes in fact prime? In the earlier example, the first three members (41, 43 and 47) are prime but 49 is composite.

The reason I'm interested is that today (being 25300 days old) I've entered a decade (25300 to 25309) that contains four prime numbers (25301, 25303, 25307 and 25309). As it turns out, such decades are infrequent. There are only 22 of them in the range from 0 to 31720. The reason I stopped at 31720 is that the decade from 31720 to 31729 contains four primes (31721, 31723, 31727 and 31729). Thus out of a total of 3172 decades, only 22 contain four primes. This is slightly under 0.7%.

The following SAGE program that I wrote is meant to identify all decades containing four primes up to 31,720:
INPUT
primes=list(prime_range(1,31720))
for p in range(3,len(primes)):
   if primes[p]-primes[p-1]==2 and primes[p-1]-primes[p-2]==4 and primes[p-2]-primes[p-3]==2:
            print primes[p-3], primes[p-2], primes[p-1],primes[p] 
OUTPUT
5 7 11 13
11 13 17 19
101 103 107 109
191 193 197 199
821 823 827 829
1481 1483 1487 1489
1871 1873 1877 1879
2081 2083 2087 2089
3251 3253 3257 3259
3461 3463 3467 3469
5651 5653 5657 5659
9431 9433 9437 9439
13001 13003 13007 13009
15641 15643 15647 15649
15731 15733 15737 15739
16061 16063 16067 16069
18041 18043 18047 18049
18911 18913 18917 18919
19421 19423 19427 19429
21011 21013 21017 21019
22271 22273 22277 22279
25301 25303 25307 25309
All I can do is enjoy the novelty because it will be long time until I encounter the next decade. Day number 31720 is 6420 days away or 17.577 years. I'll be 87 years old, if I survive that long. In fact, the length of the gap between this prime quadruple and the next sets a record compared to all previous gaps. The gap between 25309 (the p+8 member of the present quadruple) and 31721 (the p member of the next quadruple) is 6412. Here is a list of the gaps (with records shown in bold):
Gap between 101 and 19 is 82
Gap between 191 and 109 is 82
Gap between 821 and 199 is 622
Gap between 1481 and 829 is 652
Gap between 1871 and 1489 is 382
Gap between 2081 and 1879 is 202
Gap between 3251 and 2089 is 1162
Gap between 3461 and 3259 is 202
Gap between 5651 and 3469 is 2182
Gap between 9431 and 5659 is 3772 
Gap between 13001 and 9439 is 3562
Gap between 15641 and 13009 is 2632
Gap between 15731 and 15649 is 82
Gap between 16061 and 15739 is 322
Gap between 18041 and 16069 is 1972
Gap between 18911 and 18049 is 862
Gap between 19421 and 18919 is 502
Gap between 21011 and 19429 is 1582
Gap between 22271 and 21019 is 1252
Gap between 25301 and 22279 is 3022 
Gap between 31721 and 25309 is 6412 
Here is the SAGE code that I used to generate the gaps (output is shown above):
INPUT
primes=list(prime_range(1,32000))
quadruples=[]
for p in range(2,len(primes)):
    if primes[p]-primes[p-1]==2 and primes[p-1]-primes[p-2]==4 and primes[p-2]-primes[p-3]==2:
        for x in range(0,4):
            quadruples.append(primes[p-x])
ordered=sorted(quadruples)
for p in range(2,len(ordered)):
    print "Gap between",ordered[4*p],"and",ordered[4*p-1],"is",Integer(ordered[4*p])-Integer(ordered[4*p-1])

Monday 9 July 2018

Pandigital Numbers Formed From the Product of a Number and its Reversal

Today I turned 25299 days old. Here is the Numbermatics representation of it.


What's interesting about this number is that a pandigital number is created when it is multiplied by its reversal:

25299 * 99252 = 2510976348

It turns out that there are 141 numbers that generate a pandigital number when multiplied by their reversal. Fifteen of them are semiprimes. These numbers form OEIS A178929:


 A178929

Numbers m such that m*reversal(m) contains every decimal digit exactly once.


I wrote some SAGE code to generate the complete list of numbers, the largest member of which is 6611100 since 661110 * 11166 = 7381954260.

Here is the code (permalink):

L=[]
count=0
for number in range(1, 700000):
    pandigital=['0','1','2','3','4','5','6','7','8','9']
    digits=list(str(number))
    digits.reverse()
    reversed=0
    index=len(digits)
    for x in digits:
        index-=1
        reversed+=Integer(x)*10^index
    product=number*reversed
    if sorted(list(str(product)))==pandigital:
        count+=1
        L.append(number)
print(L)

[14979, 19167, 19497, 19839, 20247, 20499, 21657, 21864, 22185, 22227, 22329, 25299, 25755, 26325, 28344, 28665, 29643, 32184, 32319, 32418, 32724, 32889, 34194, 34692, 35265, 35853, 36489, 36957, 39588, 41754, 42327, 42564, 42723, 43476, 43656, 44382, 44445, 44997, 45714, 45765, 45807, 45915, 46458, 46524, 46812, 47175, 48123, 49143, 51585, 51954, 52362, 53757, 54444, 55752, 56253, 56682, 56754, 57174, 58122, 58515, 61596, 61857, 65538, 65634, 65808, 67329, 67434, 69177, 69516, 70467, 70818, 70854, 71109, 72222, 72324, 73389, 74202, 75612, 75735, 75816, 75963, 76191, 76407, 77196, 79491, 79944, 80856, 81423, 81807, 83556, 84069, 84648, 85464, 88593, 90117, 91323, 92322, 92376, 92769, 93891, 96048, 96729, 97779, 97941, 98337, 98463, 98823, 99252, 99402, 111660, 115350, 128340, 131250, 132930, 141540, 144360, 147060, 148140, 151230, 154140, 158160, 159240, 162630, 175440, 252630, 321510, 362520, 362610, 392310, 414510, 418410, 429510, 438210, 445710, 451410, 521310, 535110, 607410, 618510, 634410, 661110]


on July 23rd 2021

Saturday 7 July 2018

What Does A Number Look Like?


Very recently I came across a site called Numbermatics that provides information about the properties of an entered number but also represents the number pictorially in terms of its prime factors and number of divisors. The home page asks the question: What does the number 43003166792914270 look like? This is response:


As the fine print above says: the visualisation shows the ratios of its 4 prime factors (large circles) and 24 divisors. The only problem is that 43003166792914270 has six prime factors and not four, an inauspicious introduction to a website. The factorisation is 2 * 5 * 191 * 3533 * 5119 * 1244911. 

However, entering the same number into the search box brings up the correct factors and representation:


I've sent an email informing the site of of its error. Anyway, back to the pictorial representation, my reaction is mixed. The overlapping circles in the centre, representing the prime factors, overlap one another which immediately reminded me of Venn diagrams and intersection of sets. To my mind, the circles should not overlap, as the factors having nothing in common, and the area of the circle should be proportional to the size of the factor. Maybe the idea is that the prime factors are like the nucleus of an atom and the divisors are like the electrons in orbit around it. 

If so, then this idea would work better in 3 dimensions where spheres could represent the prime factors, be clearly separate and have their volumes proportional to the size of the factors. The various combinations of factors could represent the various electron shells: the inner shell would consist of factors formed by combining two prime factors, the next shell would consist of factors formed by combining three prime factors and so on. This is overly ambitious I'm sure and to be fair the Numbermatics representation looks good and conveys the information clearly once you understand how it works.

If the factors 2 * 5 * 191 * 3533 * 5119 * 1244911 were represented as spheres then the corresponding radii of these spheres would be 1.3, 1.7, 5.8, 15.2, 17.2 and 107.6 (to one decimal place). This means that while the largest factor (1244911) is 622455.5 larger than the smallest factor (2), the radius of the largest sphere is only a little more than 85 times the radius of the smallest sphere. The composite factors could be similarly represented and would tend to grow in volume as the number of prime factor constituents increased.