Showing posts with label Loeschian. Show all posts
Showing posts with label Loeschian. Show all posts

Wednesday, 2 September 2026

Let Us Count the Ways

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

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

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

Factorization Conditions

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

Symmetry and Distinct Ways

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

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

Sunday, 11 June 2023

Linear Relationships Between Loeschian Numbers

It all began innocently enough with my investigation of the number associated with my diurnal age today, 27097. It turns out that this number is a member of OEIS A198775: 


  A198775

Numbers having exactly four representations by the quadratic form \(x^2+xy+y^2\) with \(0 \leq x \leq y\).

We see that: $$ \begin{align} 7^2+7 \times 161+ 161^2&= 27097\\47^2 +47 \times 136+136^2&= 27097\\64^2+ 64 \times 123 +123^2&= 27097\\77^2+77 \times 112+112^2&= 27097 \end{align}$$The first member of the sequence is the famous taxi cab number 1729 and I've written about this in my post titled Loeschian Numbers on January 5th 2022.

I then decided to investigate what numbers have exactly five representations by the quadratic form \(x^2+xy+y^2\) with \(0 \leq x \leq y\). The initial numbers that satisfy this condition are 8281, 17689, 24843, 31213, 33124, 45619, 47089, 53067, 56203, 56791, 57967, 62377, 63973, ...

For example 8281 has \( (x,y) \) representations as:

(0, 91), (11, 85), (19, 80), (39, 65), (49, 56)

The sequence is not recognised by the OEIS. I then moved to numbers that have six such representations. This yielded 12103, 19747, 22477, 23569, 27391, 28861, 32851, 34447, 36309, 36673, 38857, 40033, 42679, 43771, 46501, 48412, 50323, 50869, ...

For example, 12103 has \( (x,y) \) representations as:

(2, 109), (21, 98), (27, 94), (34, 89), (49, 77), (61, 66) 

Again, this sequence is not recognised by the OEIS. I then turned to numbers that have seven such representations. This yielded 104377 and 105469 although I'm sure there are more if I extended the search.

For example, 104377 has \( (x,y) \) representations as:

(47, 297), (69, 283), (72, 281), (107, 256), (131, 237), 137, 232), (181, 192) 

Again this sequence is not recognised by the OEIS. I then turned to numbers that have eight such representation. This yielded 53599, 63973, 74347, 84721, ...

For example, 53599 has \( (x,y) \) representations as:

(3, 230) (25, 218) (43, 207) (58, 197) (85, 177) (90, 173) (102, 163) (122, 145) 

Again this sequence wasn't recognised by the OEIS but I got the following intriguing message:

Sorry, but the terms do not match anything in the table.

Your sequence appears to be: \(10374 \, x + 43225 \)

This rather shocked me but it's indeed true. I checked the factorisation of the two numbers and as can be seen they are highly factorisable:$$ \begin{align} 10374 &=2 \times 3 \times 7 \times 13 \times 19\\43225 &=5^2 \times 7 \times 13 \times 19 \end{align}$$Furthermore, we have:$$ \begin{align} 10374 \times 1 + 43225 &= 53599\\10374 \times 2 + 43225 &= 63973\\10374 \times 3 + 43225 &= 74347\\10374 \times 4 + 43225 &= 84721 \end{align} $$However, using my Jupyter notebook, I extended the range of terms and found that the very next term after 84721 did not match up. The next term is 104377 but$$10374 \times 5 + 43225 =95095 \neq 104377$$Later terms however, do match up even though, term by term, the two series diverge sharply (see Figure 1) .


Figure 1

Actual Series: 

53599, 63973, 74347, 84721, 104377, 105469, 115843, 121303, 126217, 136591, 138229, 144781, 152551, 160797, 164983, 167713, 172081, 177289, 178087, 188461, 189007, 191737, 191919, 202027, 205387, 205933, 211603, 214396, 219583, 222859, 223041, 225589, 238693, 240331, 241129, 245791, 251503, 254163, 255892, 261079, 262171, 265993, 271453, 271999, 273637, 276241, 280231, 281827, 283309, 285649, 290563, 292201, 297388, 298753, 300181, 300979, 307489, 309127, 312949, 313131, 316407, 325507, 325717, 326599, 329251, 329707, 333697, 338884, 344071, 345247, 346801, 347529, 348859, 352261, 358267, 359233, 363909, 364819, 367003, 371917, 378651, 379561, 383173, 385567, 388759, 392119, 392977, 393421, 395941, 397537, 399931, 403039, 405223, 405769, 409773, 414687, 416689, 417487, 417508, 421876, 424669, 425971, 426517, 427609, 432523, 434343, 436639, 438529, 442897, 445081, 449407, 451801, 457219, 457653, 459277, 459823, 463372, 467077, 468013, 468559, 475741, 476749, 477337, 478933, 481663, 482391, 485212, 486031, 489307, 489769, 494949, 496951, 503139, 504868, 506863, 508417, 510601, 513019, 514843, 516243, 523621, 524797, 528619, 530803, 531867, 534261, 536389, 537943, 538447, 541177, 543571, 543907, 544453, 545713, 546364, 548821, 552916, 554743, 557479, 558961, 561379, 565383, 566293, 567021, 569023, 569191, 571753, 572299, 573097, 575211, 575757, 579124, 582673, 586117, 589057, 590863, 591409, 592249, 595231, 603421, 604903, 605059, 606081, 609427, 610204, 612313, 614341, 616161, 617799, 619801, 622573, 623371, 624169, 624967, 625177, 627991, 629083, 632149, 634291, 634543, 634809, 637819, 640927, 641173, 643188, 644371, 644917, 646009, 647311, 647881, 648613, 649831, 650503, 655291, 658749, 659932, 661297, 664573, 667147, 668577, 669123, 670033, 670852, 671251, 672049, 673309, 676767, 679357, 679861, 681163, 684019, 684229, 686413, 688324, 697333, 700063, 703969, 704977, 707161, 708253, 709156, 710353, 710437, 711607, 712348, 712411, 716079, 720993, 721981, 723387, 724087, 726313, 726817, 727909, 737149, 737373, 740467, 742729, 743071, 746179, 746263, 748657, 750841, 753571, 753844, 754509, 755209, 756028, 759031, 762489, 764491, 766948, 767011, 767676, 771043, 771589, 772597, 774151, 774319, 775333, 776209, 778687, 778813, 781417, 783237, 783601, 786513, 786961, 788671, 790153, 794941, 795739, 797979, 798343, 800527, 802123, 807079, 808108, 811447, 813001, 814359, 815997, 820477, 820911, 821548, 823732, 825643, 826987, 827659, 828723, 834613, 835639, 838201, 839059, 840007, 840693, 842023, 843661, 845481, 846412, 847483, 849927, 850297, 856947, 857584, 860587, 862771, 863569, 864367, 866047, 866761, 869953, 871507, 871689, 872599, 875161, 876603, 878332, 879823, 882973, 884317, 886483, 886879, 887341, 890701, 891436, 892164, 896077, 896259, 897883, 899689, 900543, 902356, 902937, 904267, 904813, 905107, 905863, 909181, 909571, 912457, 913003, 917833, 919429, 920647, 922467, 923377, 926443, 927381, 932197, 932659, 933751, 935389, 937099, 938119, 938847, 939393, 940849, 941317, 941773, 943033, 944167, 945763, 949221, 949753, 950677, 952861, 954772, 957229, 961093, 961324, 962143, 964516, 966301, 971299, 972439, 976521, 977151, 979279, 979797, 983164, 984067, 984529, 987259, 987753, 988183, 989121, 993643, 993811, 994357, 996151, 997633, 999037, 999271, 1000027, 1001091, 1002589, 1003093, 1004731, 1009489, 1016652, 1019179, 1019683, 1021657, 1023568, 1030351, 1030393, 1031401, 1032213, 1035139, 1035741, 1038331, 1042587, 1042951, 1044316, 1049503, 1051687, 1052233, 1057069, 1060423, 1061347, 1062271, 1063972, 1068249, 1079029, 1093963, 1121029, 1128673, 1151059, 1177813, 1215487, 1241023, 1246609, 1319227, 1323049, 1356901

Linear Series: 

53599, 63973, 74347, 84721, 95095, 105469, 115843, 126217, 136591, 146965, 157339, 167713, 178087, 188461, 198835, 209209, 219583, 229957, 240331, 250705, 261079, 271453, 281827, 292201, 302575, 312949, 323323, 333697, 344071, 354445, 364819, 375193, 385567, 395941, 406315, 416689, 427063, 437437, 447811, 458185, 468559, 478933, 489307, 499681, 510055, 520429, 530803, 541177, 551551, 561925, 572299, 582673, 593047, 603421, 613795, 624169, 634543, 644917, 655291, 665665, 676039, 686413, 696787, 707161, 717535, 727909, 738283, 748657, 759031, 769405, 779779, 790153, 800527, 810901, 821275, 831649, 842023, 852397, 862771, 873145, 883519, 893893, 904267, 914641, 925015, 935389, 945763, 956137, 966511, 976885, 987259, 997633, 1008007, 1018381, 1028755, 1039129, 1049503, 1059877, 1070251, 1080625, 1090999, 1101373, 1111747, 1122121, 1132495, 1142869, 1153243, 1163617, 1173991, 1184365, 1194739, 1205113, 1215487, 1225861, 1236235, 1246609, 1256983, 1267357, 1277731, 1288105, 1298479, 1308853, 1319227, 1329601, 1339975, 1350349, 1360723, 1371097, 1381471, 1391845, 1402219, 1412593, 1422967, 1433341, 1443715, 1454089, 1464463, 1474837, 1485211, 1495585, 1505959, 1516333, 1526707, 1537081, 1547455, 1557829, 1568203, 1578577, 1588951, 1599325, 1609699, 1620073, 1630447, 1640821, 1651195, 1661569, 1671943, 1682317, 1692691, 1703065, 1713439, 1723813, 1734187, 1744561, 1754935, 1765309, 1775683, 1786057, 1796431, 1806805, 1817179, 1827553, 1837927, 1848301, 1858675, 1869049, 1879423, 1889797, 1900171, 1910545, 1920919, 1931293, 1941667, 1952041, 1962415, 1972789, 1983163, 1993537, 2003911, 2014285, 2024659, 2035033, 2045407, 2055781, 2066155, 2076529, 2086903, 2097277, 2107651, 2118025, 2128399, 2138773, 2149147, 2159521, 2169895, 2180269, 2190643, 2201017, 2211391, 2221765, 2232139, 2242513, 2252887, 2263261, 2273635, 2284009, 2294383, 2304757, 2315131, 2325505, 2335879, 2346253, 2356627, 2367001, 2377375, 2387749, 2398123, 2408497, 2418871, 2429245, 2439619, 2449993, 2460367, 2470741, 2481115, 2491489, 2501863, 2512237, 2522611, 2532985, 2543359, 2553733, 2564107, 2574481, 2584855, 2595229, 2605603, 2615977, 2626351, 2636725, 2647099, 2657473, 2667847, 2678221, 2688595, 2698969, 2709343, 2719717, 2730091, 2740465, 2750839, 2761213, 2771587, 2781961, 2792335, 2802709, 2813083, 2823457, 2833831, 2844205, 2854579, 2864953, 2875327, 2885701, 2896075, 2906449, 2916823, 2927197, 2937571, 2947945, 2958319, 2968693, 2979067, 2989441, 2999815, 3010189, 3020563, 3030937, 3041311, 3051685, 3062059, 3072433, 3082807, 3093181, 3103555, 3113929, 3124303, 3134677, 3145051, 3155425, 3165799, 3176173, 3186547, 3196921, 3207295, 3217669, 3228043, 3238417, 3248791, 3259165, 3269539, 3279913, 3290287, 3300661, 3311035, 3321409, 3331783, 3342157, 3352531, 3362905, 3373279, 3383653, 3394027, 3404401, 3414775, 3425149, 3435523, 3445897, 3456271, 3466645, 3477019, 3487393, 3497767, 3508141, 3518515, 3528889, 3539263, 3549637, 3560011, 3570385, 3580759, 3591133, 3601507, 3611881, 3622255, 3632629, 3643003, 3653377, 3663751, 3674125, 3684499, 3694873, 3705247, 3715621, 3725995, 3736369, 3746743, 3757117, 3767491, 3777865, 3788239, 3798613, 3808987, 3819361, 3829735, 3840109, 3850483, 3860857, 3871231, 3881605, 3891979, 3902353, 3912727, 3923101, 3933475, 3943849, 3954223, 3964597, 3974971, 3985345, 3995719, 4006093, 4016467, 4026841, 4037215, 4047589, 4057963, 4068337, 4078711, 4089085, 4099459, 4109833, 4120207, 4130581, 4140955, 4151329, 4161703, 4172077, 4182451, 4192825, 4203199, 4213573, 4223947, 4234321, 4244695, 4255069, 4265443, 4275817, 4286191, 4296565, 4306939, 4317313, 4327687, 4338061, 4348435, 4358809, 4369183, 4379557, 4389931, 4400305, 4410679, 4421053, 4431427, 4441801, 4452175, 4462549, 4472923, 4483297, 4493671, 4504045, 4514419, 4524793, 4535167, 4545541, 4555915, 4566289, 4576663, 4587037, 4597411, 4607785, 4618159, 4628533, 4638907, 4649281, 4659655, 4670029, 4680403, 4690777, 4701151, 4711525, 4721899, 4732273, 4742647, 4753021, 4763395, 4773769

Matching Terms:

53599, 63973, 74347, 84721, 105469, 115843, 126217, 136591, 167713, 178087, 188461, 219583, 240331, 261079, 271453, 281827, 292201, 312949, 333697, 344071, 364819, 385567, 395941, 416689, 468559, 478933, 489307, 530803, 541177, 572299, 582673, 603421, 624169, 634543, 644917, 655291, 686413, 707161, 727909, 748657, 759031, 790153, 800527, 842023, 862771, 904267, 935389, 945763, 987259, 997633, 1049503, 1215487, 1246609, 1319227

54 out the 346 terms that I generated match up with the linear sequence. That's almost 20% of the terms. There's clearly more at play here than meets the eye but I don't know what it is. If we look at the list of matching terms, we find the following values for \(x\) in \(10374 \, x + 43225\) generate the terms in the sequence:

1, 2, 3, 4, 6, 7, 8, 9, 12, 13, 14, 17, 19, 21, 22, 23, 24, 26, 28, 29, 31, 33, 34, 36, 41, 42, 43, 47, 48, 51, 52, 54, 56, 57, 58, 59, 62, 64, 66, 68, 69, 72, 73, 77, 79, 83, 86, 87, 91, 92, 97, 113, 116, 123

Thus for the last term we have \(10374 \times 123 + 43225 = 1319227 \).

Sunday, 21 May 2023

Loeschian Primes

I wrote about Loeschian numbers in an eponymous post on January 5th 2022 where I wrote that Loeschian numbers are numbers of the form \(x^2+xy+y^2\) where \(x\) and \(y\) are positive integers. These integers do not need to be distinct and do not need to be prime. Of the first one thousand integers, 277 of them are Loeschian and so they are relatively common.

However, if we restrict \(x\), \(y\) and the Loeschian number itself to being prime then the resultant Loeschian primes form OEIS A244146:


 A244146

Primes of the form \(x^2 + x \times y + y^2\) with \(x\), \(y\) primes. 
      

The initial members of the sequence are (permalink):

19, 67, 79, 109, 163, 199, 349, 433, 457, 607, 691, 739, 937, 997, 1063, 1093, 1327, 1423, 1447, 1489, 1579, 1753, 1777, 1987, 2017, 2089, 2203, 2287, 2383, 2749, 3229, 3463, 3847, 3943, 4051, 4177, 4513, 4567, 5347, 5413, 5479, 5557, 5653, 6079, 6133, 6271, 6661, 7537, 7867, 7873, 8287, 9973, 10513, 10597, 10957, 11149, 11161, 11329, 11779, 11863, 11923, 12007, 12163, 12451, 12583, 13009, 13063, 13093, 13597, 14293, 14407, 14437, 15277, 15307, 15727, 16519, 17359, 17659, 18127, 19213, 19477, 19603, 19687, 19777, 20011, 20719, 21193, 22963, 23017, 23293, 23581, 23977, 24421, 24967, 25657, 26347, 26497, 26701, 27067, 27103, 27409, 27697, 27817, 28789, 29629, 30187, 30427, 31189, 31237, 32587, 33091, 33343, 33577, 33613, 33751, 34231, 34537, 35353, 35437, 35803, 36919, 37699, 37747, 38239, 38851, 39133, 39157, 39217, 39409, 39667, 40213, 40237, 40471, 40819, 41263, 41467, 41539, 41863, 41911, 42223, 43321, 44203, 44917, 46681, 47797, 48157, 48523, 49927, 50287, 50707, 51853, 52957, 53233, 54547, 54673, 57973, 58771, 59743, 62233, 62347, 63577, 64927, 65983, 66763, 66943, 69709, 70423, 74857, 76243, 78853, 79693, 81931, 82351, 84697, 84793, 85513, 91453, 97369, 103813, 103837, 107227

It can be noted that \(x\) and \(y\) cannot be equal otherwise we have \(3x^2\). The first Loeschian prime is 19 and is constructed as follows:$$2^2+2 \times 3 + 3^2=19$$The last prime in the above list is 107227 and is constructed as follows:$$181^2+181 \times 197 + 197^2= 107227$$Interestingly none of these primes are Sophie Germain primes. If we extend the range to one million there are still none. 

However, if we look for primes of the form \(2p-1\) rather than \(2p+1\), we find many. In the range up to about a quarter of a million, there are 1706 Loeschian primes and, of these, 309 are of the form \(2p-1\). These primes are:

19, 79, 199, 607, 691, 937, 997, 2089, 4051, 4177, 4567, 5479, 5557, 6079, 6271, 7537, 7867, 8287, 10597, 11779, 13009, 14407, 15277, 16519, 17659, 19477, 19687, 23581, 26701, 27067, 27817, 30187, 31237, 32587, 33577, 34537, 39667, 40237, 40819, 41539, 44917, 52957, 57037, 57487, 57847, 58567, 58771, 62347, 64927, 69247, 74527, 74857, 75781, 77569, 81931, 82351, 87697, 89071, 89767, 92347, 94219, 95317, 96757, 97327, 98947, 102241, 103837, 108517, 109717, 113329, 114859, 114889, 116191, 127657, 129967, 133261, 133717, 135799, 137791, 154579, 160861, 161527, 164419, 164617, 170197, 172801, 174877, 174907, 181081, 188827, 190837, 201997, 210229, 215767, 216481, 218749, 226267, 226777, 228577, 229267, 232861, 233917, 234457, 238639, 239137, 244159, 244567, 245269, 247519, 248407, 255181, 256579, 259717, 261631, 264991, 280327, 293767, 298159, 303151, 310567, 311407, 311827, 315097, 321187, 325477, 328921, 332617, 336901, 343087, 351457, 351517, 362407, 364537, 367687, 377617, 378997, 382549, 385027, 385057, 402037, 406117, 406789, 407857, 409177, 416947, 423769, 428167, 430747, 435307, 436957, 443089, 454849, 455647, 457981, 458317, 464467, 467017, 470461, 473287, 486769, 487717, 500911, 519301, 525127, 531457, 534241, 534637, 541267, 542149, 544477, 547237, 555967, 564667, 568807, 575557, 580747, 610447, 620947, 621739, 630967, 633037, 634597, 640837, 644257, 651727, 652417, 655399, 673951, 693097, 703897, 705787, 706837, 709117, 710557, 739507, 741847, 761977, 763897, 769597, 771769, 778237, 780817, 784129, 796267, 803911, 811777, 813097, 813217, 823399, 826759, 830719, 832747, 841207, 857029, 858427, 867487, 877567, 888397, 888541, 894547, 897601, 903757, 908671, 909289, 912337, 916417, 918079, 924139, 956107, 960217, 970867, 971077, 974137, 975847, 986149, 987061, 989887, 992449, 999067, 1009669, 1018447, 1024477, 1024987, 1027459, 1030867, 1037857, 1044457, 1050391, 1050811, 1058221, 1059547, 1061317, 1112341, 1113667, 1130359, 1132309, 1137457, 1139227, 1145269, 1155997, 1192267, 1203667, 1209337, 1231177, 1248271, 1257787, 1260577, 1283677, 1285777, 1294597, 1332547, 1335361, 1351117, 1385947, 1395127, 1442377, 1457647, 1468507, 1472077, 1485937, 1522447, 1559689, 1563817, 1572871, 1609477, 1620739, 1631491, 1635559, 1662457, 1688497, 1693429, 1699381, 1712149, 1724617, 1755739, 1795867, 1831441, 1900687, 1908367, 1911037, 1959697, 2028277, 2103307, 2116969, 2193337, 2232427, 2407117, 2413927, 2599189

Take the first as an example:$$19 \times 2 -1=37 \text{ which is prime}$$If we look at the final number in the list above, we see that:$$25599189 \times 2 -1=51198377 \text{ which is prime}$$Of all these Loeschian and \(2p-1\) primes above, only one leads to a prime that is also Loeschian and that prime is 2089 leading to 4177. Here are their constructions:$$ \begin{align} 2089&=5^2 + 5 \times 43 + 43^2\\4177 &= 2089 \times 2 -1\\&=19^2+19 \times 53 +53^2 \end{align}$$We have to go to 3296949 before this happens again:$$ \begin{align} 3291949 &=397^2+ 397 \times 1583+1583^2\\ 6583897 &=3291949 \times 2 -1\\ &=53^2+53 \times 2539 + 2539^2 \end{align}$$If we extend our range still further we find the following: 27793477, 65947201, 87196177, 88718437, 160502137 and 172502377. Clearly such numbers are few and far between (permalink).