Showing posts with label parity. Show all posts
Showing posts with label parity. Show all posts

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

    Thursday, 9 May 2019

    Golygons

    As I track my diurnal age, every day's number always holds some mathematical significance that Numbers Aplenty or the Online Encyclopaedia of Integer Sequences will usually uncover. Every day holds the promise that I'll be introduced to some mathematical concept that I've never encountered before. Today was one such day because I was introduced to the concept of a golygon.

    The number that lead me there was 25603, a twin prime with 25601, and one of the OEIS sequences to which it belonged caught my attention:
    A292618: the first prime of 8 consecutive primes a, b, c, d, e, f, g, h such that a + g = c + e and b + h = d + f. 
    The sequence begins: 359, 389, 839, 853, 937, 1019, 2213, 2221, 2237, 2593, 3019, 3821, 3823, 4111, 4231, 4801, 5407, 5839, 6997, 12241, 13499, 14741, 15473, 25603, ...
    At first I was inclined to dismiss this as another of the many highly contrived sequences that litter the OEIS but then an ASCII diagram (see Figure 1) in the comments section caught my attention:

    Figure 1

    This was interesting. The relationship between the octuplet of primes now had a clear geometrical significance. It was a link in the OEIS entry that lead me to the golygon. So what is a golygon? Wikipedia states that:
    A golygon is any polygon with all right angles (a rectilinear polygon) whose sides are consecutive integer lengths. Golygons were invented and named by Lee Sallows, and popularised by A.K. Dewdney in a 1990 Scientific American column (Smith). Variations on the definition of golygons involve allowing edges to cross, using sequences of edge lengths other than the consecutive integers, and considering turn angles other than 90°.
    The least possible number of sides that a golygon can have is eight and there is only one of this type (see Figure 2):

    Figure 2 (from Wikipedia)
    The sequence of numbers shown 1, 2, 3, 4, 5, 6, 7, 8 can be modified to 2, 3, 4, 5, 6, 7, 8, 9 or 3, 4, 5, 6, 7, 8, 9, 10 etc. However, the 8-sided golygon with its sides formed from eight consecutive prime numbers is an instance of the variations alluded to in the definition. The number of sides that a golygon can have must be a multiple of eight and so the next largest golygon will have 16 sides. There are 112 possibilities. Figure 3 shows a 16-sided golygon with sides whose lengths form the first 16 prime numbers:

    Figure 3 (from blog)

    Figure 4 shows the tessellation of the plane using the unique 8-sided golygon:

    Figure 4: from blog

    There is a three dimensional analogue of the two dimensional golygon. It's called a golyhedron but I'll save that for a possibly later post. Finally, Figure 5 shows the 8-sided golygon that I created using geoboard (by trial and error because I didn't refer to the original diagram in creating it).

    Figure 5: golygon created using geoboard

    This would be a good exercise for primary students who could also easily count the number of squares (52) that comprise it and work out its perimeter (36). They could then investigate the area of a square and rectangles with the same perimeter as the golygon. 

    Figure 6 shows another variation on the classical 8-sided golygon. This one has sides that are not in sequence but alternate from odd to even. In the classic 8-sided polygon, the horizontal sides have opposite parity to the vertical sides.

    Figure 6: from blog

    Figure 8 shows a 6-sided "golygon" (although strictly speaking a golygon must have eight sides) in which the sides are formed from the Fibonacci numbers 1, 2, 3, 5, 8, 13:

    Figure 8: from blog

    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.