Showing posts with label figurate number. Show all posts
Showing posts with label figurate number. Show all posts

Saturday, 21 December 2019

The Original Taxi Cab Number in a New Light

Today I turned 25829 days old and, amongst the number's many different properties, one in particular caught my eye. The property was that it is a member of OEIS A262054: Euler pseudoprimes to base 7: composite integers such that:$$ |7^{(n-1)/2}| \equiv 1 \pmod {n}$$Now there's no sign of 1729, the original taxi cab number, but we'll get there. Firstly however, how did 1729 earn its sobriquet? Here an excerpt from Wikipedia:
The name is derived from a conversation in about 1919 involving mathematicians G. H. Hardy and Srinivasa Ramanujan. As told by Hardy: 
"I remember once going to see him [Ramanujan] when he was lying ill at Putney. I had ridden in taxi-cab No. 1729, and remarked that the number seemed to be rather a dull one, and that I hoped it was not an unfavourable omen. "No," he replied, "it is a very interesting number; it is the smallest number expressible as the sum of two [positive] cubes in two different ways."
Figure 1

The two different ways are: \(1^3 + 12^3\) and \(9^3 + 10^3\).

I won't go further into taxicab numbers here as the Wikipedia article explains things well enough. What I want to do is cast a new light on 1729, the number that Hardy originally thought was a rather dull number. The light I'm casting comes from the Euler pseudoprimes. 

I've already discussed pseudoprimes in two earlier posts: Fermat Pseudoprimes and Carmichael Numbers. I did make make passing mention of Euler pseudoprimes in the former post but didn't go into the matter further. Figure 1 shows a screenshot of part of what Wikipedia has to say about Euler pseudoprimes. 

The excerpt in Figure 1 concludes with the observation that:
The absolute Euler pseudoprimes are a subset of the absolute Fermat pseudoprimes, or Carmichael numbers, and the smallest absolute Euler pseudoprime is 1729 = 7×13×19.
It's surprising then that a mathematician of Hardy's calibre should not have recognised 1729 as having quite some claim to fame. In fact, the Online Encyclopaedia of Integer Sequences (OEIS) has 794 entries for the number so it is far from dull. Let's consider some of the other entries for 1729 in the OEIS. 

One entry is not surprising when the factorisation of 1729 is considered and the factors are arranged in descending order: 19 x 13 x 7. Let's add a 1 to give 19 x 13 x 7 x 1. The numbers 19, 13, 7 and 1 form an arithmetic sequence and this shows 1729 to be a so-called sextuple factorial. This can be written as 19!!!!!! or 19!6.

1729 counts the ways that a 2 x 2 matrix can be populated with integers from -7 to +7 in such a way that every matrix is singular (that is has a determinant of zero). It thus forms part of OEIS A209981

Figure 2: 35 points in a body-centered cubic lattice, 
forming two cubical layers around a central point

In the realm of figurate numbers, 1729 is a centred cube number. These are numbers of the form:\((n+1)^3+n^3\) and of course 1729 can be written as \(10^3+9^3\). Figure 2 shows the example of the centred cube number 35 and Wikipedia explains:
A centred cube number is a centred figurate number that counts the number of points in a three-dimensional pattern formed by a point surrounded by concentric cubical layers of points, with \(i^2\) points on the square faces of the \(i\)-th layer. Equivalently, it is the number of points in a body-centred cubic pattern within a cube that has \(n + 1\) points along each of its edges. 
The first few centred cube numbers are:
1, 9, 35, 91, 189, 341, 559, 855, 1241, 1729, 2331, 3059, 3925, 4941, 6119, 7471, 9009, ... (sequence A005898 in the OEIS).
1729 is also an heptagonal number, a 12-gonal or dodecagonal number, a 24-gonal or icosotetragonal number but that's probably enough for the moment.

Sunday, 21 July 2019

The Cubohemioctahedron and other Polyhedra

Figure 1: a cubohemioctahedron (source)

Today I turned 25675 days old and one of the properties of this number is that it is figurate, of the centered cubohemioctahedral variety. Specifically it is a member of OEIS A274973: centered cubohemioctahedral numbers:$$ \text{a(}n \text{)} = 2 \times n^3+9 \times n^2+n+1$$In the case of 25675, the value of \(n\) is 22. However, I had no idea what a cubohemioctahedron was and so I set about finding out.

A cubohemioctahedron is shown in Figure 1 and, where F stands for faces, E for edges and V for vertices, it is characterised by \(F = 10, E = 24\) and \(V = 12\). Naturally this shape adheres to $$ \text{Euler's Formula: } V-E+F=2$$It is an impressive shape with the indented tetrahedra (in yellow), meeting at a central point which acts as the first term (1) of the centered cubohemioctahedral numbers. It is described thus in Wikipedia:
In geometry, the cubohemioctahedron is a nonconvex uniform polyhedron, indexed as U15. Its vertex figure is a crossed quadrilateral. It is given Wythoff symbol 4/3 4 | 3, although that is a double-covering of this figure. A nonconvex polyhedron has intersecting faces which do not represent new edges or faces. In the picture vertices are marked by golden spheres, and edges by silver cylinders. It is a hemipolyhedron with 4 hexagonal faces passing through the model centre. The hexagons intersect each other and so only triangle portions of each are visible.
There are several terms is this definition that require further explanation. Firstly though, Figure 2 shows the cubohemioctahedron in the centre with the relates shapes of cuboctahedron and octahemioctahedron on the left and right:

Figure 2: source

Compare the cubohemioctahedron with the first stellation of the cuboctahedron as shown in Figure 3.

Figure 3: first stellation of the cuboctahedron (source)

In the stellation shown in Figure 3, the square and triangular faces have been stellated. If only the triangular faces were stellated then the cubohemioctahedron would represent the opposite of that. In other words, the tetrahedra would be removed rather than added. I don't want to discuss the Wythoff symbol in this post because I'd rather focus on the beauty and practical construction of these objects rather than the more abstract mathematics. 

What follows are some interesting links and resources relating to polyhedra in this post. This is an area of mathematics that has long interested me but which, for whatever reasons, I've rather neglected.
  • How To Fold It: The Mathematics of Linkages, Origami, and Polyhedra. An interesting book by Joseph O'Rourke who has a website related to this book and containing additional material. Cover photo in Figure 4.

Figure 4

  • There is a nice PowerPoint presentation titled Polyhedra in Art by George W. Hart. that looks at historical examples of polyhedra in art.


  • Amazing Origami, a book by Kunihiko Kasahara described as "a complete introduction to the mathematical theory of Origami based on the teachings of Freidrich Froebel (1782-1852) and a step-by-step guide to 33 colourful and fun paper folding projects". Cover photo in Figure 5.

Figure 5

  • A Constellation of Original Polyhedra, a book by John Montroll described as "origami expert John Montroll provides simple directions and clearly detailed diagrams for creating amazing polyhedral. Step-by-step instructions show how to create 34 different models". Cover photo in Figure 6.
Figure 6

  • Unit Polyhedron Origami, a book by Tomoko Fuse described as "With step-by-step diagrams, detailed instructions and over 70 photographs in vibrant full-color, internationally-renowned origamist and author Tomoko Fuse offers an innovative approach to origami based on assembling separate, multi-dimensional shapes into one structure". Figure 7 shows a page from the book in which a structure is made out of twenty cuboctohedra.
Figure 7

Figure 8

A space-filling polyhedron, sometimes called a plesiohedron, is a polyhedron which can be used to generate a tessellation of space. Although even Aristotle himself proclaimed in his work On the Heavens that the tetrahedron fills space, it in fact does not. Several space-filling polyhedra are in Figure 8. 
The cube is the only Platonic solid possessing this property. However, a combination of tetrahedra and octahedra do fill space. In addition, octahedra, truncated octahedron, and cubes, combined in the ratio 1:1:3, can also fill space. In 1914, Föppl discovered a space-filling compound of tetrahedra and truncated tetrahedra. 
There are only five space-filling convex polyhedra with regular faces: the triangular prism, hexagonal prism, cube, truncated octahedron. The rhombic dodecahedron and elongated dodecahedron, and trapezo-rhombic dodecahedron appearing in sphere packing are also space-fillers, as is any non-self-intersecting quadrilateral prism. The cube, hexagonal prism, rhombic dodecahedron, elongated dodecahedron, and truncated octahedron are all "primary" parallelohedra.

Well, I've made a start on this project but it's far from finished. Today I turned 25676 days old. This was kind of inevitable because yesterday I was 25675 days old but the point is that the number 25676 is associated with the stellated dodecahedron as shown in Figure 9.

Figure 9: stellated dodecahedron (source)

The dodecahedron has 20 vertices and 12 faces. In the stellated docedahedron, the faces become pentagonal pyramids and the associated 12 vertices make for a total of 32 points where edges meet. 25676 is a member of OEIS A318159: figurate numbers based on the small stellated dodecahedron: $$ \text{a(}n \text{)} = \frac{n \times (21 \times n^2 - 33 \times n + 14)}{2}$$The initial terms are:$$1, 32, 156, 436, 935, 1716, 2842, 4376, 6381, 8920, 12056, 15852, 20371, 25676, ...$$

Monday, 22 April 2019

Heptagonal Numbers

Today I turned 25586 days old and, as it turns out, this is a centered heptagonal number given by the formula:$$
\frac{7 n \; (n-1)}{2}+1 \text{  or  } \frac{7n^2-7n+2}{2}
$$
Figure 1: the initial centred heptagonal numbers

The initial centered heptagonal numbers are given by OEIS A069099 (note that these numbers alternate parity in the pattern odd-even-even-odd):

1, 8, 22, 43, 71, 106, 148, 197, 253, 316, 38 , 463, 547, 638, 736, 841, 953, 1072, 1198, 1331, 1471, 1618, 1772, 1933, 2101, 2276, 2458, 2647, 2843, 3046, 3256, 3473, 3697, 3928, 4166, 4411, 4663, 4922, 5188, 5461, 5741, 6028, 6322, 6623, 6931, 7246, 7568, 7897, 8233, 8576, 8926, 9283, 9647, 10018, 10396, 10781, 11173, 11572, 11978, 12391, 12811, 13238, 13672, 14113, 14561, 15016, 15478, 15947, 16423, 16906, 17396, 17893, 18397, 18908, 19426, 19951, 20483, 21022, 21568, 22121, 22681, 23248, 23822, 24403, 24991, 25586

Numbers Aplenty provides a couple of interesting formulae but nothing concerning how they were derived. The formulae are:$$\sum_{n=1}^\infty \frac{1}{H_n}=\frac{2 \pi \tanh \big ( \frac{\pi}{2\sqrt 7} \big )}{\sqrt 7} \text{  and  } \sum_{n=1}^\infty \frac{H_n}{2^n}=15$$Both are fine-looking formulae where \( \tanh \) is the hyperbolic tangent function defined as:$$ \tanh \theta = \frac{\sinh \theta}{\cosh \theta}=\frac{e^{\theta}-e^{-\theta}}{e^{\theta}+e^{- \theta}}=\frac{e^{2 \theta}-1}{e^{2 \theta}+1}$$A centered heptagonal prime is a centered heptagonal number that is prime. These primes form OEIS A144974 and the initial members of this sequence are:

43, 71, 197, 463, 547, 953, 1471, 1933, 2647, 2843, 3697, 4663, 5741, 8233, 9283, 10781, 11173, 12391, 14561, 18397, 20483, 29303, 29947, 34651, 37493, 41203, 46691, 50821, 54251, 56897, 57793, 65213, 68111, 72073, 76147, 84631, 89041

OEIS A144975 also lists a sequence of centered heptagonal twin prime numbers. Each member of this sequence is associated with its twin e.g. 43 is associated with 41 and 71 is associated with 73 etc. and the initial members of this sequence are:

43, 71, 197, 463, 1933, 5741, 8233, 9283, 11173, 14561, 34651, 41203, 57793, 68111, 84631, 104147, 139301, 168631, 207523, 244861, 307693, 333103, 357281, 415381, 465011, 475273, 506731, 592663, 595547, 607153, 729373, 742211, 781397, 876751

So far I've only focused on centered heptagonal numbers but another category of figurate numbers is the heptagonal numbers defined by the formula:$$\frac{5n^2-3n}{2}$$These numbers comprise OEIS A000566 and the initial members are:

0, 1, 7, 18, 34, 55, 81, 112, 148, 189, 235, 286, 342, 403, 469, 540, 616, 697, 783, 874, 970, 1071, 1177, 1288, 1404, 1525, 1651, 1782, 1918, 2059, 2205, 2356, 2512, 2673, 2839, 3010, 3186, 3367, 3553, 3744, 3940, 4141, 4347, 4558, 4774, 4995, 5221, 5452, 5688 

The parity of heptagonal numbers follows the pattern odd-odd-even-even. Like square numbers, the digital root in base 10 of a heptagonal number can only be 1, 4, 7 or 9. Five times a heptagonal number, plus 1 equals a triangular number.

There is an impressive formula for the sum of the reciprocals of the heptagonal numbers:$$ \begin{align} &\sum_{n=1}^\infty \frac{2}{n(5n-3)} = \frac{1}{15}{\pi}{\sqrt{25-10\sqrt{5}}} \\ +  &\frac{2}{3}\ln(5)+\frac{{1}+\sqrt{5}}{3}\ln\left(\frac{1}{2}\sqrt{10-2\sqrt{5}}\right)+\frac{{1}-\sqrt{5}}{3}\ln\left(\frac{1}{2}\sqrt{10+2\sqrt{5}}\right) \end{align} $$This formula and other related formulae are derived in a June 2008 paper titled Beyond the Basel Problem: Sums of Reciprocals of Figurate Numbers. The paper is not for the faint-hearted. Another paper that I stumbled upon when investigating heptagonal numbers was titled Heptagonal Numbers in the Lucas Sequence and Diophantine Equations \(x^2(5x -  3)^2 = 20y^2  \pm 16\). This paper doesn't look as formidable.

However, an article titled Project Euler 61: Find the sum of the only set of six 4-digit figurate numbers with a cyclic property on this site proved to be of the most interest. The article begins:
For some reason Problem 61 of Project Euler is a problem that not so many people have solved compared to the problems in the sixties range.  However, I think that it was a quite approachable problem which was fun to solve.  The problem reads: 
Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae: 
Triangle: \(P_{3,n}=n(n+1)/2 \) with initial members 1, 3, 6, 10, 15, …
Square: \(P_{4,n}=n^2\) with initial members 1, 4, 9, 16, 25, …
Pentagonal: \(P_{5,n}=n(3n-1)/2 \) with initial members 1, 5, 12, 22, 35, …
Hexagonal: \(P_{6,n}=n(2n-1) \) with initial members 1, 6, 15, 28, 45, …
Heptagonal: \(P_{7,n}=n(5n-3)/2 \) with initial members 1, 7, 18, 34, 55, …
Octagonal: \(P_{8,n}=n(3n-2)  \) with initial members 1, 8, 21, 40, 65, … 
The ordered set of three 4-digit numbers: 8128, 2882, 8281, has three interesting properties: 
1. The set is cyclic, in that the last two digits of each number is the first two digits of the next number (including the last number with the first). 
2. Each polygonal type: triangle (\(P_{3,127}=8128 \)), square (\(P_{4,91}=8281)\), and pentagonal (\(P_{5,44}=2882 \)), is represented by a different number in the set. 
3. This is the only set of 4-digit numbers with this property. 
Find the sum of the only ordered set of six cyclic 4-digit numbers for which each polygonal type: triangle, square, pentagonal, hexagonal, heptagonal, and octagonal, is represented by a different number in the set.
The author of the article provides the code he used to solve this problem. As he said, he used a brute force approach as I probably would if I were attempting it in SageMath (which I haven't tried as yet). Anyway, to cut to the chase, the six cyclic 4-digit numbers are:

1281, 8128, 2882, 8256, 5625, 2512

2512 is the heptagonal number, 1281 is octagonal, 8128 is hexagonal, 2882 is pentagonal, 8256 is triangular and 5625 is a square number (and also a centered octagonal number). 

This article got me curious about Project Euler so I decided to investigate further. Here is what I found:
About Project Euler
Leonhard Euler (1707-1783)
 
What is Project Euler? 
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems. 
The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.

Who are the problems aimed at?
 
The intended audience include students for whom the basic curriculum is not feeding their hunger to learn, adults whose background was not primarily mathematics but had an interest in things mathematical, and professionals who want to keep their problem solving and mathematics on the cutting edge.

Can anyone solve the problems?
 
The problems range in difficulty and for many the experience is inductive chain learning. That is, by solving one problem it will expose you to a new concept that allows you to undertake a previously inaccessible problem. So the determined participant will slowly but surely work his/her way through every problem.

What next?
 
In order to track your progress it is necessary to setup an account and have Cookies enabled. If you already have an account then Login, otherwise please Register – it's completely free! 
However, as the problems are challenging then you may wish to view the Problems before registering.
There are currently 656 problems listed and I thought it would be interesting to try to solve some of them using SageMath, so I signed up to the site. The first problem I tried was a very simple one but hey, it's a start. Here was the problem:
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... 
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
The answer turns out to be 4613732 and here is the SageMath code that I used to arrive at the solution:
n=0
sum=0
while fibonacci(n)<4000000:
    if fibonacci(n) % 2==0:
        sum+=fibonacci(n)
    n=n+1
print sum
Figure 2: feedback from Project Euler
You might think it's cheating to use the fibonacci function in SageMath but it's easy enough to generate the Fibonacci sequence without resorting to it. However, it's available so I used it. Figure 2 shows the feedback I received from Project Euler. I'm encouraged to try to solve some of the other 655 problems remaining, hopefully with a higher difficulty rating.

Friday, 4 May 2018

Polygonal Number Generating Function and Formula

Today my diurnal age is 25233, a number that happens to be a polygonal number, specifically a 32-gonal number. A WolframAlpha article states that the generating function for the n-gonal numbers is given by: $$G_n(x)= \frac{x \, [(n-3)x+1]}{(1-x)^3} $$ This means that for the 32-gonal numbers, the formula becomes: $$G_{32}(x)= \frac{x \, (33x+1)}{(1-x)^3}$$In WolframAlpha, the coefficients can then be identified using the series command:


In Sage, the Taylor series is generated using the code:
g(x)=x*(33*x+1)/(1-x)^3
g.taylor(x,0,15).coefficients()
When run, this code produces the following output:


In the case of the 36-gonal numbers, the formula for the n-th term is given by:$$a(n)=n(17n-16) $$The general formula for the n-th polygonal number is given by:$$a(n)=(P-2) \frac{n(n+1)}{2}-(P-3)n$$where \(P\) is the number of vertices of the polygon.

In the case of \(P=36 \) (our 36-gon), the formula becomes:$$34\frac{n(n+1)}{2}-33n=n(17n-16) $$Here's a video describing how the formula is derived: