Monday, 9 January 2023

The Trapped Knight

THE TRAPPED KNIGHT: PART ONE (A REVIEW)


I've already written about a trapped knight in a post from May 23rd 2020 titled Knight Tours in which the Knight gets trapped on an infinite chess board if it follows these rules:

Suppose we devise a Knight Tour such that the Knight starts on square 0 and then moves always to the unvisited square closest to the origin. "Closest to the origin" is meant in the sense of Euclidean distance, and in case of a tie, the square coming earliest on the spiral is chosen.

On the first move, the Knight could move to squares 9, 11, 13, 15, 17, 19, 21 or 23. All these squares are the same distance from the 0 square but 9 is chosen because it comes first in the spiral. From 9, subsequent squares are 2, 5, 8, 3, 6, 1, 4, 7, 10, 13 and so on. 

 Figure 1 depicts the situation:


Figure 1
As I wrote in my post at the time:

The initial terms are of the sequence are:

0, 9, 2, 5, 8, 3, 6, 1, 4, 7, 10, 13, 28, 31, 14, 11, 26, 23, 44, 19, 22, 43, 40, 17, 34, 37, 18, 15, 32, 29, 52, 25, 46, 21, 76, 47, 50, 27, 12, 33, 16, 39, 20, 45, 24, 51, 48, 77, 114, 73, 70, 105, 38, 35, 60, 93, 30, 53, 84, 49, 78, 115, 74, 41, 68, 103, 36, 61, 94, 57, 54, 85, 124, 81, ...

What's really interesting about this tour is that the knight gets trapped at the 22325th move, where it can't reach any unvisited square. The square on which the Knight is stuck is 25983. 

Of course, if the numbering began from one instead of zero, then the square on which the knight becomes stuck would be 25984. 

THE TRAPPED KNIGHT: PART TWO

Yesterday I turned 26943 days old and this number is also associated with a trapped knight that gets trapped following a different set of rules. To begin with, the infinite chessboard is numbered slightly differently. See Figure 2.


Figure 2: screenshot from Numberphile video

As can be seen, the numbering starts from one, not zero. The rule for the knight's movements is that it must move to the lowest available square and not the square that is closest to the origin. The numbers of the squares that the knight moves to are listed in OEIS A316667: 

 
A316667

Squares visited by a knight moving on a spirally numbered board always to the lowest available unvisited square.

The initial terms are:

1, 10, 3, 6, 9, 4, 7, 2, 5, 8, 11, 14, 29, 32, 15, 12, 27, 24, 45, 20, 23, 44, 41, 18, 35, 38, 19, 16, 33, 30, 53, 26, 47, 22, 43, 70, 21, 40, 17, 34, 13, 28, 25, 46, 75, 42, 69, 104, 37, 62, 95, 58, 55, 86, 51, 48, 77, 114, 73, 108, 151, 68, 103, 64, 67, 36

As the OEIS comments state: 

This sequence is finite: At step 2016, square 2084 is visited, after which there are no unvisited squares within one knight move.

The number of steps required to become trapped, 2016,  is far less than the number required in the PART 1 example where 22325 steps were required. Figure 3 shows the path of the knight as it starts at 1 and ends up at 2084. The path was generated by Python code that I found on this site. I pasted the code into SageMathCell and it worked just fine. Here is the permalink. This graphic always appears in the Numberphile video.

Figure 3

If 2084 is the end of the knight's tour and  26943 is never visited, then how can this number  be involved? The answer is that we can continue the tour if we repeatedly block the squares where the knight would not have any available moves. Thus when we get to 2467, the square before 2084, we block the latter and move instead to the next lowest number and the tour continues. See Figure 4:


Figure 4: screenshot from Numberphile video

Eventually the knight gets trapped again once it moves to square 2720. Again we block that square and allow the knight to move to the next lowest square. These blocked squares constitute OEIS A323714:

 
A323714

Squares where knight moving to a lowest unvisited square on a spirally numbered board will have no available moves.



The initial members of the sequence are:

2084, 2720, 3325, 3753, 7776, 5632, 7411, 8562, 14076, 8469, 9231, 22702, 14661, 21710, 21078, 25809, 27112, 24708, 19844, 26943, 26737, 32449, 31366, 45036, 37853, 37188, 43318, 62095, 67401, 68736

It's more useful to put these terms in ascending order, in which case the sequence appears as:

2084, 2720, 3325, 3753, 5632, 7411, 7776, 8469, 8562, 9231, 14076, 14661, 19844, 21078, 21710, 22702, 24708, 25809, 26737, 26943, 27112, 31366, 32449, 37188, 37853, 43318, 45036, 62095, 67401, 68736

Now we can see that the next number in the sequence is 27112 and this occurs on June 26th 2023. After this, there is a considerable gap before 31366 is reached.

Sunday, 8 January 2023

Runs of Identical Digits in Cubed Numbers

The number associated with my diurnal age yesterday, 26942, has the property that its cube contains a run of five 8's since$$26942^3=19556426288888$$Such a property is not that common. In the range of numbers up to one million, there are only 514 such numbers. They are listed below. The digit sequence "942" occurs quite frequently the numbers containing this digit sequence have been marked in bold (permalink).

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 88888 (five 8's)

1942, 9615, 19420, 26942, 27402, 32456, 51942, 56676, 57768, 76942, 87455, 88097, 96150, 101942, 105639, 115315, 126942, 134727, 136421, 142578, 143504, 151942, 152605, 161796, 176942, 182605, 183004, 194200, 201942, 226942, 228234, 231627, 242355, 251942, 266319, 269420, 274020, 276942, 283928, 289364, 295827, 301942, 324560, 325776, 326942, 329844, 351942, 360598, 376942, 377881, 389055, 391485, 395027, 401942, 426942, 432304, 446288, 449611, 451942, 466836, 476942, 481869, 481892, 501942, 503767, 506209, 512852, 513843, 517872, 517973, 519112, 519420, 519918, 526942, 539523, 543887, 547416, 551942, 566760, 573766, 576942, 577680, 578113, 580208, 593342, 596116, 596169, 601942, 602507, 602663, 620486, 624538, 626428, 626942, 642355, 651942, 653484, 661064, 675389, 676942, 682768, 684018, 701942, 710646, 711529, 723609, 726942, 751942, 758886, 761096, 761361, 769420, 776942, 787777, 788225, 789482, 791466, 801942, 825672, 826942, 830088, 836354, 851942, 852004, 855117, 861724, 871089, 874550, 876942, 877538, 879792, 880970, 883181, 899467, 901942, 908223, 908256, 915429, 921383, 926942, 943483, 948083, 950254, 951942, 961497, 961498, 961499, 961500, 976942, 980221, 985426, 985521, 987095, 993312

If we extend the run to six 8's, the following numbers qualify in the range up to one million. Note the digit sequence 6942 predominates (permalink).

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 888888 (six 8's)

76942 --> 455502130888888

326942 --> 34947180653888888

360598 --> 46888888826167192

576942 --> 192042109176888888

769420 --> 455502130888888000

826942 --> 565490287699888888

830088 --> 571968888883241472

877538 --> 675768268888884872

883181 --> 688888844916818741

948083 --> 852195188888887787

985426 --> 956912108888888776

Trying for seven 8's, only these numbers qualify (permalink):

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 8888888 (seven 8's)

360598 --> 46888888826167192

948083 --> 852195188888887787

985426 --> 956912108888888776

There are no number in the range up to one million (and even ten million) that produce eight 8's when cubed. So what about seven 7's. Are there numbers in the range up to one million, that produce seven 7's when cubed? It turns out that there are not. However, there are a few numbers that produce six 6's (permalink).

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 666666 (six 6's)

40548 --> 66666601046592

159238 --> 4037756666669272

205408 --> 8666666043277312

266151 --> 18853166666640951

405480 --> 66666601046592000

480108 --> 110666666397419712

537361 --> 155166666621176881

698474 --> 340761666666040424

699637 --> 342466666667067853

705579 --> 351266666653819539

827515 --> 566666611464815875

892954 --> 712011914706666664

There is only one number that produces seven 6's and that is 699637 (marked in bold above). The following numbers produce six 5's (permalink):

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 555555 (five 5's)

67354 --> 305555550877864

269416 --> 19555555256183296

516602 --> 137869515555559208

673540 --> 305555550877864000

981344 --> 945069645855555584

There are three numbers whose cubes contain seven 4's (permalink):

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 4444444 (seven 4's)

134708 --> 2444444407022912

720993 --> 374794444444986657

822389 --> 556201144444449869

There are 11 numbers whose cubes produce six 3's:

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 333333 (six 6's)

32183 --> 33333397072487

321830 --> 33333397072487000

417367 --> 72703333334369863

446477 --> 89001489338333333

510873 --> 133333368622708617

532302 --> 150825333333127608

632748 --> 253333336694092992

664437 --> 293333339149701453

675071 --> 307643933333382911

689701 --> 328082123333339101

767615 --> 452303926733333375

There are two numbers that produce seven 2's when cubed.

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 2222222 (seven 2's)

339247 --> 39043437522222223

475741 --> 107674222222294021

The following numbers produce six 1's:

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 111111 (six 1's)

48075 --> 111111210421875

194967 --> 7411111162029063

271234 --> 19954111111440904

288471 --> 24005263647111111

480750 --> 111111210421875000

480751 --> 111111903785004751

567232 --> 182508110911111168

758847 --> 436981111119711423

768373 --> 453645165661111117

790054 --> 493140111111077464

857466 --> 630450111111270696

915441 --> 767169057611111121

923058 --> 786478711961111112

926419 --> 795101111114018059

There are two numbers that produce a run of seven 9's:

NUMBERS WHOSE CUBES CONTAIN THE DIGIT SEQUENCE 9999999 (seven 9's)

764149 --> 446204706999999949

887904 --> 699999995878539264

For zeroes, things are relatively trivial so I won't bother with that. Again, there is a lot more to be explored here. For example, what about runs of consecutive digits? 177434 when cubed produces a run of consecutive digits from 1 to 8: 5586123456782504.

Saturday, 7 January 2023

Forming Large Primes

 I was surprised to come across the tweet shown in Figure 1 from Fermat's Library:


Figure 1: permalink

While this is surprising enough, it's also interesting that, whether we are counting down from 82 or counting up from 1, none of the intermediate numbers is prime. The prime has 155 digits. However, if the digits are removed or added one by one, then there are two intermediate primes (permalink). These are:

746454443424140393837363534333231302928272625242322212019181716151413121110987654321

21110987654321

If we start adding the numbers to the right of the 1 instead of to the left, it has been shown that no primes exist up to \(n\)=344869 (see comments to OEIS A007908). The search for such a prime formed in this manner is continuing. 

This got me thinking about other ways to create large primes, starting from 1 each time. What if we add only prime numbers to the left or right. How long before a prime is created? 


ADDING ONLY PRIMES TO THE LEFT

Well, let's starting adding primes to the left of 1 up to a limit of 1000. This what I found (permalink):

231917131175321 with 15 digits

41373129231917131175321 with 23 digits

898379737167615953474341373129231917131175321 with 45 digits


ADDING ONLY PRIMES TO THE RIGHT

What if the primes are added to the right of the 1? This is the result (permalink):

1235711 with 7 digits

123571113171923 with 15 digits


ADDING ONLY ODD NUMBERS TO THE LEFT

What if we add only odd numbers to the left of the 1? This is the result (permalink):

31 with 2 digits

737169676563615957555351494745434139373533312927252321191715131197531 with 69 digits

12312111911711511311110910710510310199979593918987858381797775737169676563615957555351494745434139373533312927252321191715131197531 with 131 digits


ADDING ONLY ODD NUMBERS TO THE RIGHT

What if we add the odd numbers to the right of the 1? Here are the results (permalink):

13 with 2 digits

135791113151719 with 15 digits

135791113151719212325272931 with 27 digits

135791113151719212325272931333537394143454749515355575961636567 with 63 digits

135791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597 with 93 digits

This investigation is never-ending so I'll stop there but counting down from 82 to 1 still holds the record for the longest prime at 155 digits. The permalinks above can be easily modified to investigate other variations.

A Prime and Semiprime Generating Quadratic Polynomial

The quadratic \(2n^2+29\) is especially adept at generating primes and semiprimes. Initially it generates 29 distinct primes for \(n = 0, 1, \dots, 28\). The primes are:

29, 31, 37, 47, 61, 79, 101, 127, 157, 191, 229, 271, 317, 367, 421, 479, 541, 607, 677, 751, 829, 911, 997, 1087, 1181, 1279, 1381, 1487, 1597

When \(n=29\), the first semiprime, 1711 = 29 x 59 is generated. This is in fact how I first encountered this quadratic. My diurnal age today is 26941 and this number is a member of OEIS A241554:


 A241554

Semiprimes generated by the polynomial 2 * n^2 + 29                                     

 The initial members of the sequence are:

1711, 1829, 2077, 2479, 3071, 3901, 5029, 6527, 6757, 7471, 7967, 8479, 10397, 10981, 11581, 14141, 15167, 15517, 15871, 16591, 16957, 17701, 18079, 18847, 19631, 20837, 22927, 23791, 25567, 26941, 27877, 28829, 29797, 30287, 31279, 31781, 32287, 35941, 38117

In the range from 0 to 1000 (1001 numbers overall),  there are:

  • 497 primes or about 49.7%
  • 446 semiprimes or about 44.6%
  • 58 triprimes or about 0.58%

There are no numbers with more than three factors. The first triprime is reached when \(n=185\) and this is \(68479 = 31 \times 47^2\) and this is also the first square-free number as well. This means that none of the previous semiprimes are square numbers.

The first composite numbers with four prime factors is reached when \(n=1334\) and this is 3559141 = 29 x 31 x 37 x 107. In the range up to 5000, there are only twenty such numbers. These are:

  • 1334 --> 3559141 = 29 * 31 * 37 * 107
  • 1704 --> 5807261 = 31 * 37 * 61 * 83
  • 2444 --> 11946301 = 37 * 61 * 67 * 79
  • 2958 --> 17499557 = 29 * 37 * 47 * 347
  • 3132 --> 19618877 = 29 * 31 * 139 * 157
  • 3481 --> 24234751 = 47 * 61 * 79 * 107
  • 3628 --> 26324797 = 31 * 37 * 59 * 389
  • 3688 --> 27202717 = 31 * 59 * 107 * 139
  • 3857 --> 29752927 = 29 * 47 * 83 * 263
  • 3945 --> 31126079 = 47 * 79 * 83 * 101
  • 3998 --> 31968037 = 31 * 37 * 47 * 593
  • 4031 --> 32497951 = 29 * 31 * 37 * 977
  • 4186 --> 35045221 = 31 * 47 * 67 * 359
  • 4277 --> 36585487 = 31 * 59 * 83 * 241
  • 4327 --> 37445887 = 37 * 47 * 61 * 353
  • 4438 --> 39391717 = 37 * 83 * 101 * 127
  • 4640 --> 43059229 = 29 * 61 * 101 * 241
  • 4775 --> 45601279 = 31 * 37 * 83 * 479
  • 4859 --> 47219791 = 67^3 * 157
  • 4930 --> 48609829 = 29 * 31 * 139 * 389
Overall, in the range up to 5000, there are:

  • 1920 primes or about 38%
  • 2436 semiprimes or about 49%
  • 625 triprimes or about 12.5%
  • 20 other composite numbers (listed above) or less than 0.5%
If we extend the range to 10000, there are (permalink):
  • 3484 primes or about 35%
  • 4904 semiprimes or about 49%
  • 1540 triprimes or about 15.5%
  • 73 other composite numbers or about 0.5%
In the range up to 100000 there are:
  • 27545 primes or about 27%
  • 46605 semiprimes or about 47%
  • 22575 triprimes or about 23%
  • 3276 other composite numbers or about 3%
Thus as the range increases, the percentage of primes steadily decreases (49.7% --> 38% --> 35% --> 27%) while the percentage of semiprimes remains fairly steady (44.6% --> 49% --> 49% --> 47%). Overall, this quadratic would seem to be best at producing semiprimes and at a steady rate of almost 50%.

I do make passing reference to this quadratic polynomial in a post from February 26th 2022 titled Another Prime Generating Polynomial. It appears in the following table:


As can be seen, \(2n^2+29\) makes an appearance together with \(2n^2+11\), these being the only quadratic polynomials without a linear term. I also have an earlier post from March 18th 2020 titled Prime Generating Quadratic Polynomials.

Wednesday, 4 January 2023

What's Special About 256409?

 My diurnal age today, 26939, has the property that:

  • 2 x 26939 + 3 = 53881 is prime
  • 4 x 26939 + 5 = 107761 is prime
  • 6 x 26939 + 7 = 161641 is prime
  • 8 x 26939 + 9 = 215521 is prime

  • It thus belongs to a sequence of numbers \(n\) with the property that  \(2n+3\), \(4n+5 \), \(6n+7\) and \( 8n+9\) are all prime (A105653). The initial members of the sequence are:

    164, 764, 1529, 2129, 2474, 3419, 5414, 7694, 9059, 11504, 12704, 13019, 15884, 16649, 20054, 20744, 22529, 24914, 26939, 29669, 32924, 35069, 36884, 39269

    It's interesting to see how far we can extend this property. How many numbers will also yield a \(10n+11\) that is prime? Extending the range to one million, it can be seen that a quite a few numbers do qualify. They are:

    5414, 12704, 13019, 44369, 82949, 98279, 105524, 112199, 115139, 123854, 134249, 134459, 187739, 188744, 210164, 225704, 247169, 256409, 296309, 302084, 367874, 375644, 382889, 399584, 404039, 476339, 487829, 526844, 532094, 566429, 578084, 766184, 779789, 787709, 854174, 883889, 919334, 966839

    What about \(12n+13\) as well? The result is quite a few less. In fact only 12704, 13019, 105524, 256409 and 966839 qualify.

    256409

    When we try \(14n+15\), there is only one man left standing and that is 256409. Can this number go one further to \(16n+17\)? Indeed it can but at \(18n+19\), it fails. Here is a list of the primes produced along with the final composite number (all end in the digit 1) where "True" represents a prime number and "False" represents a composite number (permalink).
    • 2 x 256409 + 3 = 512821 True
    • 4 x 256409 + 5 = 1025641 True
    • 6 x 256409 + 7 = 1538461 True
    • 8 x 256409 + 9 = 2051281 True
    • 10 x 256409 + 11 = 2564101 True
    • 12 x 256409 + 13 = 3076921 True
    • 14 x 256409 + 15 = 3589741 True
    • 16 x 256409 + 17 = 4102561 True
    • 18 x 256409 + 19 = 4615381 False
    So it is for this reason that 256409 is rather special, at least in the range of positive integers up to one million. It is in fact the first member of OEIS A105657 containing numbers with the same property as 256409 but none of them can be the first! Here are the initial members of the sequence:

    256409, 11120339, 13243229, 49798979, 296504669, 510578774, 520649219, 640598279, 674992499, 713074004, 830453714, 947378984

    It can be noted that while the initial members all end in 9, the last three listed all end in 4. Even so the primes produced still end in 1 as 2 x 4 + 3 = 11 and 2 x 9 + 3 = 21 etc.. Take the final member listed, 947378984, as an example:
    • 2 x 947378984 + 3 = 1894757971 True
    • 4 x 947378984 + 5 = 3789515941 True
    • 6 x 947378984 + 7 = 5684273911 True
    • 8 x 947378984 + 9 = 7579031881 True
    • 10 x 947378984 + 11 = 9473789851 True
    • 12 x 947378984 + 13 = 11368547821 True
    • 14 x 947378984 + 15 = 13263305791 True
    • 16 x 947378984 + 17 = 15158063761 True
    • 18 x 947378984 + 19 = 17052821731 False
    There's no reason to suppose that there are not numbers out there that would extend the primes generated to \(18n+19\) and beyond. Using a Jupyter Notebook, a search to ten million produced nothing and, extending the search to one hundred million, the Notebook experienced a meltdown. So for the time being, 947378984 remains the largest member of the sequence and 256409 its smallest.

    ******************************************

    Another interesting property of 256409 is that it has no repeating digits and, of the members of OEIS A105657 listed previously, it is the only such number. All the other numbers have at least one repeating digit. This is not all that surprising given that the other numbers have eight and nine digits and so the probability of a repeating digit is high. Any six digit number such as 256409, if digits are assigned randomly, will have a smaller probability of digits repeating. 

    ******************************************

    256409 is a sphenic number which means that it has three distinct prime factors, in this case 43, 67 and 89. Now if the primes between 43 and 89 are listed, we see the following:

    43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89

    There are four primes between 43 and 67 and four primes also between 67 and 89. How often does this symmetry occur in sphenic numbers? We might ask it in the following way:
    If \(n\) is a sphenic number with factors \(p_1\), \(p_2\) and \(p_3\), what numbers have the property that their primes indices are in arithmetic progression?
    For example, the indices of 43, 67 and 89 are 14, 19 and 24 respectively and the latter three numbers are in arithmetic progression.

    Well, in the range up to one million, there are 206964 sphenic numbers, a little over 20%. In that range only 601 satisfy the previously mentioned criteria and as we have seen 256409 is one of them. If we specify that the common difference must be 5, then only 21 numbers satisfy and these are (permalink):

    806, 1887, 3895, 6923, 14993, 21359, 37111, 47519, 66263, 96773, 119939, 172457, 207583, 256409, 323689, 390769, 480083, 541741, 649967, 778231, 936371

    Sunday, 1 January 2023

    The Circulant Matrix of a Number and its Permanent

    In a post on December 15th 2022 titled Numbers and Matrices, I wrote about the circulant matrix of a number and looked at those special numbers where the determinant of the circulant matrix was equal to the number itself. An example of such a number is 494376160 which has the circulant matrix shown in Figure 1:


    Figure 1

    These sorts of numbers form OEIS A219324 and the initial members are:

    1, 2, 3, 4, 5, 6, 7, 8, 9, 247, 370, 378, 407, 481, 518, 592, 629, 1360, 3075, 26027, 26933, 45018, 69781, 80487, 154791, 1920261, 2137616, 2716713, 3100883, 3480140, 3934896, 4179451, 4830936, 5218958, 11955168, 80651025, 95738203, 257059332, 278945612, 456790123, 469135802, 493827160, 494376160

    Instead of the determinant, we can use the permanent instead. The latter is not as well known as the former so Figure 2 provides a short explanation:


    Figure 2

    It's basically the same as the calculation for the determinant except that there are no alternating positive and negative signs. Figure 3 shows the calculations to determine the permanent of a rectangular matrix.


    Figure 3

    So now we can investigate what numbers have a circulant matrix whose permanent is equal to the number itself. It turns out that there are not that many. Here is the list up to ten million: 1, 2, 3, 4, 5, 6, 7, 8, 9, 261, 370, 407, 52036, 724212. The circulant matrix for 724212 is shown in Figure 4.

    Figure 4

    We can search for other numbers that the permanent might be equal to. The number 666 came to mind but if we collect the permanents of the first one million numbers, then there are only 269 numbers between 1 and 1000 (permalink). These are:

    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 16, 17, 18, 20, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 40, 41, 44, 45, 48, 49, 50, 52, 53, 54, 58, 61, 64, 65, 68, 72, 73, 74, 78, 79, 80, 81, 82, 84, 85, 89, 90, 91, 97, 98, 100, 106, 113, 116, 117, 120, 121, 125, 126, 128, 130, 132, 133, 136, 142, 144, 145, 152, 154, 155, 162, 164, 165, 168, 169, 171, 177, 178, 185, 189, 194, 198, 200, 201, 216, 217, 224, 226, 232, 233, 236, 243, 244, 250, 256, 257, 261, 265, 272, 273, 275, 280, 281, 289, 298, 299, 304, 305, 306, 314, 317, 324, 326, 337, 341, 343, 344, 349, 351, 353, 359, 361, 364, 366, 369, 370, 373, 384, 388, 389, 393, 394, 395, 396, 397, 400, 404, 407, 408, 409, 413, 416, 418, 420, 425, 432, 433, 434, 440, 443, 466, 468, 472, 481, 484, 486, 492, 493, 502, 504, 512, 513, 514, 520, 523, 526, 529, 530, 538, 539, 541, 544, 548, 559, 569, 574, 576, 577, 583, 586, 606, 612, 614, 624, 625, 626, 632, 633, 637, 638, 641, 656, 665, 673, 674, 676, 686, 691, 697, 706, 720, 728, 729, 730, 737, 745, 750, 753, 756, 757, 758, 765, 769, 772, 776, 782, 783, 784, 792, 793, 801, 807, 809, 810, 819, 824, 825, 833, 834, 838, 841, 850, 853, 854, 855, 872, 873, 877, 881, 882, 884, 885, 891, 896, 902, 907, 916, 926, 927, 928, 937, 945, 952, 953, 962, 964, 978, 980, 988, 990, 1000

    As can be seen, 665 is among them but not 666. If we took the permanents of numbers in excess of one million, perhaps more numbers between 1 and 1000 would appear but it's doubtful. If we do the same for the determinants, we find that there are 417 of them between 1 and 1000. Oddly enough, 666 is not among them even though the numbers on either side (665 and 667) are (permalink).

    Wednesday, 28 December 2022

    Some Properties of the Number 2023


    For my one hundredth post of the year 2022, I thought I'd create a post about the forthcoming year before it arrives. Firstly, looking at Numbers Aplenty, we find that a
     4×4 square can be tiled in 2023 ways using the L triomino and the monomino. Figure 1 shows four examples and click here to see all 2023 possible arrangements. See OEIS A220054 and A127870.


    Figure 1

    Another interesting property that Numbers Aplenty brings up is the following:

    2023 = (2+0+2+3)(22+02+22+32)2

    It also turns out that the prime factors, when concatenated, form a palindrome.

    2023 = 7 x 17 x 17 --> 71717

    This as it turns out is not a common property (see OEIS A046447). In the range of composite numbers up to 40,000, there are only 193 such numbers. In terms of years, it has been 320 years since this last happened and next occurrence will be rather sooner, in 2048. Here are the numbers (permalink):

    4, 8, 9, 16, 25, 27, 32, 39, 49, 64, 69, 81, 119, 121, 125, 128, 129, 159, 219, 243, 249, 256, 259, 329, 339, 343, 403, 429, 469, 507, 512, 625, 669, 679, 729, 795, 1024, 1207, 1309, 1329, 1331, 1533, 1547, 1587, 1589, 1703, 2023, 2048, 2097, 2187, 2319, 2321, 2359, 2401, 2649, 2701, 3039, 3125, 3421, 3503, 3629, 3633, 3639, 3729, 3897, 3899, 3975, 4096, 4303, 4607, 4719, 4839, 5289, 5295, 5547, 5565, 5603, 5739, 6209, 6401, 6561, 6591, 6597, 6979, 7269, 7663, 7819, 7833, 8029, 8192, 8203, 8427, 8519, 8745, 8921, 9329, 9583, 9703, 9707, 9795, 10001, 10021, 10201, 10299, 10599, 10731, 11199, 11499, 12207, 12729, 12795, 13129, 13489, 13573, 13801, 13929, 14133, 14147, 14189, 14295, 14399, 14641, 14829, 15459, 15463, 15549, 15563, 15625, 15987, 16233, 16384, 16507, 16807, 16863, 16959, 17161, 17295, 17363, 17859, 18489, 18789, 18829, 19003, 19683, 19689, 19875, 19907, 20111, 20289, 20489, 20589, 20667, 21259, 21959, 22139, 22507, 22719, 22801, 23019, 23619, 24601, 24901, 25459, 26349, 27879, 28273, 28601, 28609, 28847, 28951, 29729, 29829, 31129, 31363, 31423, 31829, 32357, 32761, 32768, 33173, 33339, 34391, 35143, 36481, 36501, 36763, 36849, 38307, 38899, 38955, 39599, 39939, 39963

    On the topic of palindromes, the sum of 2023 and its reverse 3202 is a palindrome. Of all the numbers from 1 to 40,000, there are 9456 (or almost 25%) with this property.

    2023 + 3202 = 5225

    2023 is also palindromic in base 16 since it equals 7e7. In the range of numbers up to 40,000, this occurs 409 times.
    2023 = 7e7

    The numbers are:

    2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 257, 273, 289, 305, 321, 337, 353, 369, 385, 401, 417, 433, 449, 465, 481, 497, 514, 530, 546, 562, 578, 594, 610, 626, 642, 658, 674, 690, 706, 722, 738, 754, 771, 787, 803, 819, 835, 851, 867, 883, 899, 915, 931, 947, 963, 979, 995, 1011, 1028, 1044, 1060, 1076, 1092, 1108, 1124, 1140, 1156, 1172, 1188, 1204, 1220, 1236, 1252, 1268, 1285, 1301, 1317, 1333, 1349, 1365, 1381, 1397, 1413, 1429, 1445, 1461, 1477, 1493, 1509, 1525, 1542, 1558, 1574, 1590, 1606, 1622, 1638, 1654, 1670, 1686, 1702, 1718, 1734, 1750, 1766, 1782, 1799, 1815, 1831, 1847, 1863, 1879, 1895, 1911, 1927, 1943, 1959, 1975, 1991, 2007, 2023, 2039, 2056, 2072, 2088, 2104, 2120, 2136, 2152, 2168, 2184, 2200, 2216, 2232, 2248, 2264, 2280, 2296, 2313, 2329, 2345, 2361, 2377, 2393, 2409, 2425, 2441, 2457, 2473, 2489, 2505, 2521, 2537, 2553, 2570, 2586, 2602, 2618, 2634, 2650, 2666, 2682, 2698, 2714, 2730, 2746, 2762, 2778, 2794, 2810, 2827, 2843, 2859, 2875, 2891, 2907, 2923, 2939, 2955, 2971, 2987, 3003, 3019, 3035, 3051, 3067, 3084, 3100, 3116, 3132, 3148, 3164, 3180, 3196, 3212, 3228, 3244, 3260, 3276, 3292, 3308, 3324, 3341, 3357, 3373, 3389, 3405, 3421, 3437, 3453, 3469, 3485, 3501, 3517, 3533, 3549, 3565, 3581, 3598, 3614, 3630, 3646, 3662, 3678, 3694, 3710, 3726, 3742, 3758, 3774, 3790, 3806, 3822, 3838, 3855, 3871, 3887, 3903, 3919, 3935, 3951, 3967, 3983, 3999, 4015, 4031, 4047, 4063, 4079, 4095, 4097, 4369, 4641, 4913, 5185, 5457, 5729, 6001, 6273, 6545, 6817, 7089, 7361, 7633, 7905, 8177, 8194, 8466, 8738, 9010, 9282, 9554, 9826, 10098, 10370, 10642, 10914, 11186, 11458, 11730, 12002, 12274, 12291, 12563, 12835, 13107, 13379, 13651, 13923, 14195, 14467, 14739, 15011, 15283, 15555, 15827, 16099, 16371, 16388, 16660, 16932, 17204, 17476, 17748, 18020, 18292, 18564, 18836, 19108, 19380, 19652, 19924, 20196, 20468, 20485, 20757, 21029, 21301, 21573, 21845, 22117, 22389, 22661, 22933, 23205, 23477, 23749, 24021, 24293, 24565, 24582, 24854, 25126, 25398, 25670, 25942, 26214, 26486, 26758, 27030, 27302, 27574, 27846, 28118, 28390, 28662, 28679, 28951, 29223, 29495, 29767, 30039, 30311, 30583, 30855, 31127, 31399, 31671, 31943, 32215, 32487, 32759, 32776, 33048, 33320, 33592, 33864, 34136, 34408, 34680, 34952, 35224, 35496, 35768, 36040, 36312, 36584, 36856, 36873, 37145, 37417, 37689, 37961, 38233, 38505, 38777, 39049, 39321, 39593, 39865

    2023 is also a:
    • Duffinian number: a composite number that has no factors in common with its sum of divisors \( \sigma(\tau)) \).

    • Harshad number: a number that is divisible by the sum of its digits. In fact, 2022 was a Harshad number and so are 2024 and 2025 we have a run of four consecutive Harshad numbers.

    • Lucky number: a number that survives a sieving process which is similar to the Eratosthenes sieve that can be used to compute the prime numbers.

    • Junction number: a number that can be formed in two ways by adding a number to its sum of digits. Here we have 1997 + sod(1997) = 2015 + sod(2015) = 2023 where sod means sum of digits.
    Turning to the Online Encyclopedia of Integer Sequences (OEIS), we find that it is a member of OEIS A063416:


     A063416

    Multiples of 7 whose sum of digits is equal to 7.   
                                       


    The sequence begins:

    7, 70, 133, 322, 511, 700, 1015, 1141, 1204, 1330, 2023, 2212, 2401, 3031, 3220, 4102, 5110, 7000, 10024, 10150, 10213, 10402, 11032, 11221, 11410, 12040, 12103, 13111, 13300, 15001, 20041, 20104, 20230, 21112, 21301, 22120, 23002, 24010 


    There is a strong connection between 2023 and the digit 7:
    • the sum of its digits is 7
    • it is divisible by 7
    • both of its factors (7 and 17) contain the digit 7
    • in octal, it has the representation 3747
    • in hexadecimal, it has the representation 7e7
    • in base 17, it has the representation 700
    • its Fibonacci seed numbers are 17 and 49 = 7 x 7
    By "Fibonacci seed numbers" I mean that by starting with 17 and 49 and proceeding Fibonacci-style, we get to 2023 thus:

    17, 49, 66, 115, 181, 296, 477, 773, 1250, 2023

    It is a member of OEIS A070258:

     
    A070258

    Smallest of 3 consecutive numbers each divisible by a square.              


    • \(2023 = 7 \times 17^2\)
    • \(2024 = 2^3 \times 11 \times 23\)
    • \(2025 = 3^4 \times 5^2\)
    The initial members of the sequence are:

    48, 98, 124, 242, 243, 342, 350, 423, 475, 548, 603, 724, 774, 844, 845, 846, 1024, 1250, 1274, 1323, 1375, 1420, 1448, 1519, 1664, 1674, 1680, 1681, 1682, 1848, 1862, 1924, 2007, 2023, 2056, 2106, 2150, 2223, 2275, 2348, 2366, 2523, 2527, 2574, 2644

    Well, that's largely what I decided to present from Numbers Aplenty and the OEIS. What else is there of interest about the number 2023? I thought I'd ask ChatGPT the following question: what are some interesting facts, mathematical or otherwise, about the number 2023? Figure 2 is a screenshot of what it spat out.


    Figure 2

    As usual with ChatGPT, when it comes to Mathematics, it can spew out some nonsense. In case, it claims 2023 is a prime number! Similarly, it's claim that "2023 is the sum of three consecutive prime numbers: 661 + 673 + 677 is false. These are indeed consecutive prime numbers but they add up to 2011. Can it get any worse? Well, yes. The claim is made that "2023 is the hypotenuse of a Pythagorean triple: (683, 992, 2023)" and testing this out we find that \(683^2+992^2=1,450,553\) while \(2023^2=4,092,529\).  We're not done yet! Another bold claim is made that "2023 can be written as the sum of two cubes in two different ways: \(2023 = 13^3 + 2^3 = 11^3 + 10^3\) ". Nope. \(13^3+2^3=2205\) and \(11^3+10^3=2331\). It turns out that 2023 cannot be expressed as a sum of two cubes. A final claim is made that 2023 has the representation 11111011111 in binary. No. The correct representation is 11111100111.

    Clearly time to give up on ChatGPT as a source of information about Mathematics. I've written about this AI bot's deficiencies in a post titled ChatGPT and a Tragi-Comedy of Integration. Let's not leave off without a final laugh. After the bot's spectacular failures, I asked it: 
    I'm impressed in a negative way. Except for points 2 and 6, every mathematical statement that you made was  wrong. 2023 is not a prime number and so on. How can you get things so wrong? 
    Its response was: 
    I apologize for any errors in my previous response. As a language model, I can provide information and answer questions to the best of my ability based on the knowledge and information that I have been trained on. However, I am not infallible and it is possible for me to make mistakes or provide incorrect information.

    In fact, 2023 is not a prime number. It can be divided evenly by 3, 11, and 61, so it is a composite number. I apologize for any confusion this may have caused.

    I hope this clears up any misunderstandings and I apologize for any errors in my previous response. Please feel free to ask me any other questions you may have.
    Actually, looking at the atomic number of Calcium, I checked and found that it was 20 not 2023. This perhaps gives an insight into what's going wrong with the bot. It's looking at the first two digits (20) and ignoring the last two digits (23). As for the Mathematics, I simply don't know how its coming up with its answers.

    All triprimes can be envisaged as "bricks", 3-D solid objects. If all three primes are distinct, we have a sphenic number and an associated sphenic brick. The volume of the brick is the number itself but there is always an associated number: the surface area of the brick. In the case of 2023, the associated number is 1054 (square units). This number is sphenic and the associated sphenic brick has a surface area of 1246 square units. This number in turn is sphenic and the associated area is 1630 square units. Once again, 1630 is sphenic with associated surface area of 2302 square units. At this point, the chain is broken because 2302 is biprime. This is summarised below:$$ \begin{align} 2023 &= 7 \times 17 \times 17 &\rightarrow 1054\\1054 &= 2 \times 17 \times 31 &\rightarrow 1246\\1246 &= 2 \times 7 \times 89 &\rightarrow 1630\\1630&= 2 \times 5 \times 163 &\rightarrow 2302\\2302 &= 2 \times 1151 \end{align}$$Figure 3 shows a list of the triprime numbers between 2000 and 2100. Thus there is another twelve years before another triprime number, 2035, is encountered. 2035 is also a sphenic number because it has three distinct factors


    Figure 3