Showing posts with label lucky numbers. Show all posts
Showing posts with label lucky numbers. Show all posts

Tuesday, 12 March 2024

27372: Another Palindromic Day

Days like today, when I turn 27372 days old, pop up every one hundred days during the course of a millennium of days and there is a 110 day gap between millennia. So, for example, from 27972 to 28082, there will be a gap of 110 days. Today's number shares some important properties with another palindrome, 26362, that I created a post about on June 6th 2021. It was titled 26362: Another Special Palindrome

One property that the two share is that they are both members of OEIS  A070001:


 A070001

Palindromic integers > 0, whose 'Reverse and Add!' trajectory (presumably) does not lead to another palindrome.


Up to 40000, the members of this sequence are not numerous and they are:

4994, 8778, 9999, 11811, 19591, 22822, 23532, 23632, 23932, 24542, 24742, 24842, 24942, 26362, 27372, 29792, 29892, 33933, 34543, 34743, 34943, 39493

It can be seen that 26362 and 27372 are consecutive and 1010 days apart in terms of my diurnal age. As I wrote in the post previously alluded to:

These palindromes are not regarded as potential Lychrel numbers because they are already palindromes and some of them are the result or end point of \(k\) + reverse(\(k\)) iterations. However, some are not and these, I think, deserve special consideration. These are:

19591, 23532, 23932, 24542, 24742, 24942, 26362, 27372, 29792, 33933, 34543, 34743, 34943, 39493

So 26362 and 27372 are paired again and they are only the 7th and 8th palindromes to have the simultaneous property that:

  • they cannot be derived from \(k\) + reverse(\(k\)) for one or more values of \(k\)
  • their Reverse and Add trajectories (presumably) do not lead to another palindrome 
These two numbers are also members of OEIS A045960:


 A045960

Palindromic even lucky numbers.



Up to 40000, the initial members are:

2, 4, 6, 22, 44, 212, 262, 282, 434, 474, 646, 666, 818, 838, 868, 2442, 2662, 2772, 4884, 4994, 6666, 6886, 8118, 8338, 20202, 20402, 21012, 21812, 22322, 22422, 22922, 23332, 23532, 24042, 25652, 26162, 26262, 26562, 26762, 27372, 28682

A property that 27372 doesn't share with 26762 is that the former's arithmetic digital root is the same of its middle digit. Of the three and five digit palindromes in the range up to 40000, there are only 36 that satisfy this condition. They are (permalink):

919, 929, 939, 949, 959, 969, 979, 989, 999, 18181, 18281, 18381, 18481, 18581, 18681, 18781, 18881, 18981, 27172, 27272, 27372, 27472, 27572, 27672, 27772, 27872, 27972, 36163, 36263, 36363, 36463, 36563, 36663, 36763, 36863, 36963

For example, the arithmetic digital root of 27372 is 2 + 7 + 3 + 7 + 2 = 21 and 2 + 1 = 3. The middle digit of 27372 is 3.

Thursday, 23 December 2021

26562: A Mid-Millennial Palindrome

Every one hundred days, as I track my diurnal age, a palindromic numbered day comes my way. Today is day 26562. Sometimes, like today's number, I create a post dedicated to the palindrome. I didn't do this for 26462 but prior to that I've posted about:

In the transition from one millennium to another, the gap increases to 110 days e.g. 25952 to 26062. Other posts relating to palindromes include:
Of course, my next palindromic day 26662 will be spectacular but today I'm focused on the less spectacular 26562. Here are some of its properties:

PROPERTY ONE


 A046263

Largest palindromic substring in \(5^n\).                              


26562 makes regular appearances in OEIS A046263, in fact it appears in every 16th term:
1, 5, 5, 5, 6, 5, 6, 8, 9, 9, 656, 828, 414, 22, 515, 757, 878, 939, 26562, 9, 9, 8, 101, 55, 464, 3223, 11611, 969, 252, 626, 515, 656, 696, 44, 26562, 7337, 51915, 75957, 797, 989, 949, 747, 787, 9739379, 86968, 707, 4224, 1001, 929, 646, 26562, 61616, 63336, ...

Here are the powers of \(n\) in which it appears up to 100:

  • \(5^{18}\) = 3814697265625
  • \(5^{34}\) = 582076609134674072265625
  • \(5^{50}\) = 88817841970012523233890533447265625
  • \(5^{66}\) = 13552527156068805425093160010874271392822265625
  • \(5^{82}\) = 2067951531382569187178521730174907133914530277252197265625
  • \(5^{98}\) = 315544362088404722164691426113114491869282574043609201908111572265625
PROPERTY TWO


 A046394



Palindromes with exactly 4 distinct prime factors.                        


Here are the initial members and their factorisations:

  Palindrome   Factorisation

  858          2 * 3 * 11 * 13
  2002         2 * 7 * 11 * 13
  2442         2 * 3 * 11 * 37
  3003         3 * 7 * 11 * 13
  4774         2 * 7 * 11 * 31
  5005         5 * 7 * 11 * 13
  5115         3 * 5 * 11 * 31
  6666         2 * 3 * 11 * 101
  10101        3 * 7 * 13 * 37
  15351        3 * 7 * 17 * 43
  17871        3 * 7 * 23 * 37
  22422        2 * 3 * 37 * 101
  22722        2 * 3 * 7 * 541
  24242        2 * 17 * 23 * 31
  26562        2 * 3 * 19 * 233
  26962        2 * 13 * 17 * 61
  28482        2 * 3 * 47 * 101
  35853        3 * 17 * 19 * 37
  36363        3 * 17 * 23 * 31

PROPERTY THREE


 A045960

Palindromic even lucky numbers.                                        


The initial members are:
2, 4, 6, 22, 44, 212, 262, 282, 434, 474, 646, 666, 818, 838, 868, 2442, 2662, 2772, 4884, 4994, 6666, 6886, 8118, 8338, 20202, 20402, 21012, 21812, 22322, 22422, 22922, 23332, 23532, 24042, 25652, 26162, 26262, 26562, 26762, 27372, 28682, 40204, 40804

Figure 1 reminds us what even lucky numbers are:

Figure 1: source

PROPERTY FOUR


 A317976

a(n) = 2(a(n-1)+a(n-2)+a(n-3))-a(n-4) for n >= 4, with initial terms 0,0,1,0.

The terms quickly increase in size and the initial terms are:

0, 0, 1, 0, 2, 6, 15, 46, 132, 380, 1101, 3180, 9190, 26562, 76763, 221850, 641160, 1852984, 5355225, 15476888, 44729034, 129269310, 373595239, 1079710278, 3120420620, 9018182964, 26063032485, 75323561860, 217689133998, 629133273722, 1818228906675, 5254779066930, 15186593360656, 43890069394800, 126844654738097

The generating function for these terms is:$$ \frac{x^2(1 - 2x) }{1 - 2x - 2x^2 - 2x^3 + x^4}$$PROPERTY FIVE


 A261924

Numbers that are the sum of two palindromes of the same length.   
          

In the case of 26562, there are 21 such palindromic pairs:
  • (16561, 10001)
  • (16461, 10101)
  • (16361, 10201)
  • (16261, 10301)
  • (16161, 10401)
  • (16061, 10501)
  • (15551, 11011)
  • (15451, 11111)
  • (15351, 11211)
  • (15251, 11311)
  • (15151, 11411)
  • (15051, 11511)
  • (14541, 12021)
  • (14441, 12121)
  • (14341, 12221)
  • (14241, 12321)
  • (14141, 12421)
  • (14041, 12521)
  • (13531, 13031)
  • (13431, 13131)
  • (13331, 13231)
The pair (13431, 13131) is of particular interest because its members share no digits in common with their addend 26562.


So the wait is on now for my next palindromic day, 26662, which interestingly falls on Saturday, April 2nd 2022, the day before my 73rd birthday. However, my 73rd Solar Return  occurs at 8:34pm on April 2nd. My birthday will thus occur on a Sunday just as on the day I was born. The 666 sequence of numbers will span ten days:

26660, 26661, 26662, 26663 (birthday), 26664, 26665, 26666, 26667, 26668, 26669

While on the subject of palindromes, I came across a tweet that I'd posted on a very special day. See Figure 2. The date was Thursday, February 4th 2010, almost 12 years ago. It's hard to read but on that date I was 22,222 days old.


Figure 2

Monday, 9 August 2021

Compositions of 365 and 366

Once the number of days that have elapsed during a calendar year and the number of days that remain are compared, we can look at this as a composition or ordered partition of either 365 during a non-leap year or 366 during a leap year. This composition or ordered partition contains only two elements. Let's consider the compositions of 365 and 366 separately.

Compositions of 365

Because the two elements must add to an odd number, one must be odd and the other even. So there can be no two elements that are both prime. The same applies to lucky numbers that are all odd. Having established that, let's look at some other possibilities.

  • Both elements are semiprimes: there are 32 such compositions e.g. (355, 10) or (10, 355) where 10 = 2 x 5 and 355 = 5 x 73. The full list is:

    [(355, 10), (339, 26), (327, 38), (326, 39), (319, 46), (314, 51), (303, 62), (291, 74), (278, 87), (274, 91), (259, 106), (254, 111), (247, 118), (219, 146), (206, 159), (187, 178), (178, 187), (159, 206), (146, 219), (118, 247), (111, 254), (106, 259), (91, 274), (87, 278), (74, 291), (62, 303), (51, 314), (46, 319), (39, 326), (38, 327), (26, 339), (10, 355)]

    • Both elements are semiprimes with no factors in common: there are 28 such compositions e.g. (339, 26) or (26, 339) where 26 = 2 x 13 and 339 = 3 x 113. The full list is:

    [(339, 26), (327, 38), (326, 39), (319, 46), (314, 51), (303, 62), (291, 74), (278, 87), (274, 91), (259, 106), (254, 111), (247, 118), (206, 159), (187, 178), (178, 187), (159, 206), (118, 247), (111, 254), (106, 259), (91, 274), (87, 278), (74, 291), (62, 303), (51, 314), (46, 319), (39, 326), (38, 327), (26, 339)] 

    • Both elements are semiprimes with one factor in common: there are 4 such compositions e.g. (219, 146) or (146, 219) where 146 = 2 x 73 and 219 = 3 x 73. The full list is:

    [(355, 10), (219, 146), (146, 219), (10, 355)]

    • Both elements are sphenic numbers, meaning that they have three distinct prime factors: there are 4 such compositions e.g. (255, 110) or (110, 255) where 110 = 2 x 5 x 11 and 255 = 3 x 5 x 17. There are none in the gcd or greatest common divisor is 1. The full list is:

    [(255, 110), (195, 170), (170, 195), (110, 255)] 

    • Both elements are NOT square free: there are 44 such compositions e.g. (361, 4) or (4, 361) where 4 = 2 x 2 and 361 = 19 x 19. The full list is:

    [(361, 4), (356, 9), (340, 25), (338, 27), (333, 32), (325, 40), (320, 45), (316, 49), (315, 50), (297, 68), (289, 76), (284, 81), (275, 90), (261, 104), (248, 117), (245, 120), (244, 121), (240, 125), (225, 140), (212, 153), (196, 169), (189, 176), (176, 189), (169, 196), (153, 212), (140, 225), (125, 240), (121, 244), (120, 245), (117, 248), (104, 261), (90, 275), (81, 284), (76, 289), (68, 297), (50, 315), (49, 316), (45, 320), (40, 325), (32, 333), (27, 338), (25, 340), (9, 356), (4, 361)]

    Compositions of 366

    • Both elements are prime: there are 36 such compositions e.g. (359, 7) and (7, 359). The full list is:

    [(359, 7), (353, 13), (349, 17), (347, 19), (337, 29), (313, 53), (307, 59), (293, 73), (283, 83), (277, 89), (269, 97), (263, 103), (257, 109), (239, 127), (229, 137), (227, 139), (199, 167), (193, 173), (173, 193), (167, 199), (139, 227), (137, 229), (127, 239), (109, 257), (103, 263), (97, 269), (89, 277), (83, 283), (73, 293), (59, 307), (53, 313), (29, 337), (19, 347), (17, 349), (13, 353), (7, 359)]

    • Both elements are lucky numbers: the lucky numbers in the range between 1 and 366 are:

    [1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99, 105, 111, 115, 127, 129, 133, 135, 141, 151, 159, 163, 169, 171, 189, 193, 195, 201, 205, 211, 219, 223, 231, 235, 237, 241, 259, 261, 267, 273, 283, 285, 289, 297, 303, 307, 319, 321, 327, 331, 339, 349, 357, 361, 363] 

    There are 20 compositions in which both elements are lucky numbers. These are:

    [(363, 3), (357, 9), (303, 63), (297, 69), (273, 93), (267, 99), (261, 105), (237, 129), (231, 135), (195, 171), (171, 195), (135, 231), (129, 237), (105, 261), (99, 267), (93, 273), (69, 297), (63, 303), (9, 357), (3, 363)] 

    A More General Strategy

    Possibly the most useful strategy in this sort of analysis is to list all the numbers between 1 and 366 that have a certain property, such as being lucky (like I just did). A completely general algorithm can then be applied that relies only on the list. Let's consider some happy numbers as an example:

    Happy numbers: there are 57 such numbers in the range between 1 and 366. These are:

    [1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365]

    Here is the general algorithm in SageMath:


    Figure 1: permalink

    Thus we see that there are 6 such pairs in a non-leap year:

    [(262, 103), (236, 129), (226, 139), (139, 226), (129, 236), (103, 262)]

    The algorithm is easily modified to accommodate leap years and in this case we find that there are 14 such pairs:

    [(365, 1), (356, 10), (338, 28), (280, 86), (263, 103), (236, 130), (190, 176), (176, 190), (130, 236), (103, 263), (86, 280), (28, 338), (10, 356), (1, 365)] 

    The list in the algorithm above could be replaced with the list of lucky numbers or any other list and the appropriate pairings could be found. I'll collect these lists together in my online Sage documentation accessible via this link and listed under 365 and 366.

    Wednesday, 16 June 2021

    Primes from Primes

    I've begun reading "The Man Who Loved Only Numbers" by Paul Hoffman, a biography of Paul Erdös. Figure 1 shows the front cover of the book. It motivated me to be a little more energetic in my daily number analysis at least for today because today was a prime day.

    Figure 1


    THE STORY OF PAUL ERDÖS AND THE SEARCH FOR MATHEMATICAL TRUTH

    ***

    By that I mean I turned a prime number of days old, specifically 26371. Initially, I'd found that this number was a member of OEIS A255543:


      A255543

    Unlucky array: Row \(n\) consists of unlucky numbers removed at the stage \(n\) of Lucky sieve.


    Figure 2, taken from the OEIS entry comments, shows what is meant by this:


    Figure 2

    Looking at the first row, it can seen that 2 and all multiples of 2 are removed. In the second row, every third remaining number is removed and so on for successive rows. 26371 lies in the 29th row that lists all the numbers removed when every 29th number is struck off. This was interesting but didn't relate to any specific properties of 26371 as a prime number. A little more research, motivated by Erdös's indefatigable research, led me to OEIS A249350:


     A249350

    Prime numbers Q such that the concatenation Q, 6, Q is prime.   
               

    As a member of this sequence, 26371 has the property that 26371626371 is a prime number. Up to 26371, the list of such primes is:
    [13, 23, 29, 41, 53, 59, 71, 73, 89, 107, 149, 167, 173, 197, 239, 241, 257, 293, 349, 379, 383, 397, 439, 457, 461, 479, 503, 521, 547, 569, 607, 617, 631, 643, 677, 691, 727, 733, 757, 821, 887, 919, 941, 947, 953, 967, 1051, 1061, 1069, 1097, 1103, 1187, 1213, 1217, 1237, 1279, 1297, 1373, 1399, 1409, 1423, 1433, 1451, 1453, 1471, 1483, 1499, 1567, 1609, 1619, 1621, 1667, 1709, 1721, 1723, 1783, 1787, 1789, 1861, 1867, 1889, 1913, 1993, 1997, 2011, 2017, 2029, 2063, 2099, 2113, 2251, 2269, 2273, 2357, 2393, 2441, 2473, 2503, 2557, 2609, 2647, 2657, 2659, 2687, 2699, 2711, 2713, 2777, 2843, 2897, 2927, 2953, 3037, 3061, 3079, 3137, 3217, 3271, 3323, 3343, 3499, 3511, 3527, 3547, 3557, 3593, 3631, 3659, 3673, 3733, 3779, 3851, 3911, 4051, 4093, 4129, 4241, 4243, 4253, 4327, 4339, 4373, 4391, 4457, 4493, 4519, 4561, 4583, 4597, 4603, 4639, 4643, 4663, 4723, 4787, 4789, 4801, 4813, 4877, 4933, 4951, 4967, 5011, 5023, 5051, 5179, 5209, 5333, 5413, 5527, 5557, 5647, 5807, 5851, 5857, 5867, 5903, 6067, 6113, 6173, 6199, 6311, 6353, 6379, 6553, 6571, 6659, 6781, 6827, 6841, 6871, 6949, 6997, 7013, 7079, 7151, 7177, 7193, 7237, 7349, 7393, 7459, 7481, 7523, 7529, 7541, 7559, 7573, 7589, 7607, 7621, 7673, 7687, 7793, 7817, 7823, 7841, 7867, 7873, 7907, 8087, 8093, 8101, 8209, 8317, 8369, 8387, 8419, 8429, 8447, 8461, 8467, 8573, 8623, 8647, 8677, 8681, 8699, 8741, 8779, 8803, 8821, 8861, 8971, 8999, 9013, 9059, 9133, 9137, 9181, 9199, 9239, 9283, 9337, 9343, 9419, 9431, 9461, 9473, 9511, 9533, 9539, 9629, 9767, 9883, 10103, 10133, 10223, 10357, 10487, 10559, 10691, 10729, 10847, 10853, 10909, 10957, 10979, 11083, 11093, 11117, 11159, 11177, 11243, 11273, 11321, 11329, 11369, 11393, 11471, 11483, 11489, 11491, 11813, 11887, 12007, 12049, 12119, 12211, 12239, 12253, 12281, 12289, 12379, 12413, 12479, 12517, 12527, 12553, 12647, 12703, 12721, 12889, 12919, 13003, 13037, 13043, 13147, 13163, 13171, 13381, 13499, 13679, 13757, 13877, 14009, 14051, 14057, 14071, 14081, 14207, 14423, 14449, 14627, 14723, 14767, 14813, 14869, 14879, 14939, 15031, 15061, 15101, 15131, 15173, 15193, 15299, 15373, 15377, 15383, 15541, 15559, 15629, 15643, 15649, 15787, 15877, 15919, 15923, 16189, 16333, 16339, 16361, 16427, 16487, 16529, 16607, 16649, 16763, 16871, 16903, 16931, 17011, 17021, 17029, 17033, 17077, 17137, 17419, 17483, 17729, 17747, 17749, 17851, 17903, 17921, 17957, 17981, 18041, 18049, 18169, 18257, 18397, 18413, 18517, 18541, 18583, 18671, 18691, 18701, 18719, 18749, 18757, 18803, 18973, 19069, 19211, 19213, 19289, 19379, 19463, 19471, 19489, 19603, 19819, 19843, 19861, 19919, 20071, 20101, 20147, 20261, 20297, 20399, 20443, 20681, 20707, 20731, 20849, 20897, 20921, 20939, 21001, 21011, 21059, 21089, 21121, 21163, 21169, 21221, 21227, 21313, 21341, 21401, 21407, 21467, 21523, 21569, 22109, 22129, 22171, 22247, 22349, 22639, 22643, 22741, 22769, 22787, 22811, 22961, 23027, 23041, 23143, 23201, 23203, 23339, 23357, 23369, 23459, 23537, 23627, 23629, 23747, 23767, 23819, 23857, 23879, 23887, 24007, 24019, 24029, 24061, 24097, 24151, 24391, 24407, 24421, 24683, 24767, 24851, 24953, 25033, 25147, 25253, 25321, 25439, 25643, 26119, 26189, 26237, 26357, 26371]

    26371 is the 2897th prime and the primes listed above total 502. This means that of all the primes up 26371, 502 or about 16.8% generate a new prime according the Q + 6 + Q concatenation. I wondered what numbers arise when the digits 1, 2, 3, 4, 5, 7, 8 and 9 are used instead. Inserting 0 between the two primes cannot produce a prime because the resulting concatenated number is always divisible by Q. Here are the figures for the digits from 1 to 9:

    1     278
    2     238
    3     528
    4     242
    5     258
    6     502
    7     296
    8     247
    9     512

    total is 3101

    It can be seen that the record is held by the digit 3, although 6 and 9 are close behind. Well back however, are the digits 1, 2, 4, 5, 7 and 8. I thought I'd extend this to the first one million primes and Figure 3 shows the results obtained:


    Figure 3

    The proportions remain about the same with the exception of the digit 7. Figure 4 shows a table summarising the results:


    Figure 4

    Why do the digits 3, 6 and 9 produce about twice as many primes as the digits 1, 2, 4, 5 and 8? Why does the digit 7 produce significantly fewer primes that 1, 2, 4, 5 and 8? These are questions that I don't know the answer to but I'm keen to investigate.

    One doesn't have to stop at the digit 9. What happens for the digits 10 to 19? Figure 5 tells the tale.


    Figure 5

    Figure 6 shows the same results in tabular form. It's clear that the multiples of 3 (12, 15 and 18) always win the day and with consistent frequency. The digits 10, 16 and 17 produce about half as many primes as their multiple of 3 counterparts, while 11, 13, 14 and 19 produce less than a third of even this number.


    Figure 6

    One might surmise that the frequency for multiples of 3 remains relatively constant as we investigate higher digits. After all, the numbers for 3, 6, 9, 12, 15 and 18 have been quite consistent. However, 21 = 3 x 7 breaks the pattern. See Figure 7.


    Figure 7

    The figure for 21 is not as low as for 22, 26 and 28 but it significantly lower than even the figures for 20, 23, 25 and 29. Figure 8 presents the results in tabular form.


    Figure 8

    Multiples of 7, 11 and 13 seem to produce far fewer primes when concatenated using Q + digit + Q. Figure 9 provides an overview of the digits from 1 to 99:


    Figure 9

    Clearly, there is more to be discovered here but I'll finish up at this point. What this post teaches us more than anything else is to not let a good prime go to waste and to be a little more energetic in my investigations.

    Monday, 25 November 2019

    The Goldbach Conjecture and Lucky Numbers

    I've written before about Lucky Numbers (Generating Lucky Numbers in Python and Lucky Numbers) as well as the Goldbach Conjecture (Goldbach's Conjecture and Zeckendorf's Theorem and Goldbach's Conjecture Revisited) but now it's time to combine the two topics. The reason we can do this is that primes and lucky numbers have similar distributions. The table in Figure 1 attests to this:
    Figure 1: source URL

    As stated on the site from which the table was taken:
    What's most interesting about lucky numbers is the fact that they share a lot of properties with primes. As can be seen from the next table the density of the lucky numbers is close to the density of the primes. This seems also be true for the density of the twin luckies and the twin primes. In addition a lot of conjectures about primes seem also to be true for the luckies. For example one of the most famous ones, the Goldbach conjecture, stating that each even integer is the sum of at most two primes seems also to be true.
    Goldbach decompositions are numerous and so, as with the decomposition into primes, we are interested in the minimal decomposition but first let's state the Goldbach conjecture for lucky numbers:

    Every even number can be expressed as a sum of two lucky numbers

    The smallest even number is 2 and that can expressed as 1 + 1. This is a little different to the primes where 1 is not regarded as a prime. Thus the Goldbach Conjecture for primes requires the even number to be greater than 2. The next even number is 4 and that can be expressed as 1 + 3 and so on. Let's take a number like 25800 and find it's minimal decomposition using SageMath. Figure 2 depicts the results using a screenshot from SageMathCell (permalink).

    Figure 2: permalink

    An interesting observation made on the website is that "no lucky number can have a digital root of 2, 5 and 8. This fact can sometimes be used to determine quickly that a given number is not lucky." I was able to find an explanation of why this is so thanks to a reference in Gardner's Workout by Martin Gardner. This is shown in Figure 3.

    Figure 3

    To see this, consider \(\frac{3k+2}{9}\). If \(k=1\) then the remainder is 5, if \(k=2\) then the remainder is 8, if \(k=3\) then the remainder is 2 and so on. The only remainders that can occur are 2, 5 and 8.

    1 2 3 4 5 6 7 8 9
    1 x 3 x 5 x 7 x 9 : first step of sieving process, all multiples of 2 are removed
    1 x 3 x x x 7 x x : second step of sieving process, all multiples of 5 are removed

    It is this sieving process, similar to the Sieve of Eratosthenes that causes the lucky numbers to have properties similar to the primes.

    There are lots more "extensions" to the original Goldbach conjecture. One such one is the ternary Golbach conjecture described in the following abstract of a 79 page paper presented in 2014:
    THE TERNARY GOLDBACH CONJECTURE IS TRUE
    H. A. HELFGOTT 
    Abstract. The ternary Goldbach conjecture, or three-primes problem, asserts that every odd integer n greater than 5 is the sum of three primes. The present paper proves this conjecture. 
    Both the ternary Goldbach conjecture and the binary, or strong, Goldbach conjecture had their origin in an exchange of letters between Euler and Goldbach in 1742. We will follow an approach based on the circle method, the large sieve and exponential sums. Some ideas coming from Hardy, Littlewood and Vinogradov are reinterpreted from a modern perspective. While all work here has to be explicit, the focus is on qualitative gains. 
    The improved estimates on exponential sums are proven in the author’s papers on major and minor arcs for Goldbach’s problem. One of the highlights of the present paper is an optimized large sieve for primes. Its ideas get reapplied to the circle method to give an improved estimate for the minor-arc integral.
    A certain Zoltan Galantai has also investigated generalisations to the Goldbach conjecture at this site

    Thursday, 14 June 2018

    Generating Lucky Numbers in Python

    I got to thinking how I could generate lucky numbers in Python (for an earlier post explaining what lucky numbers are: click here). I experimented a little but wasn't making any real progress which is not surprising given that I'm really just a beginner. A quick search revealed the following exercise: Python Math: Print the first n Lucky Numbers along with the required code. What surprised me was the brevity of the code:


    I've worked through the code now and understand it, although I struggled initially, especially. Let's suppose n is given a value of 10. This means:
    • List = range(-1,109,2) = (-1, 1, 3, 5, ..., 107, 108)
    • while List[i:] = List[2:] = (3, 5, ..., 107, 108) because initially i has a value of 2
    • List[List[i]::List[i]] = List[List[2]::List[2]] = List[3, 5, ..., 107, 108]
    • i+=1 means that value of i, will increment by 1, as the while loop is traversed
    The while loop will continue as long as List[i:] is True but eventually the i will be greater than the length of List and List[:i] will be FALSE. In SageMathCell, things look like this:


    The above code is purely Python and doesn't used any SAGE code at all. As far as I know, there's no command in the latter that will generate lucky numbers (as can be done for prime numbers). There are 82 exercises with solutions at the W3resource site. It would be instructive to attempt some of these. 

    Sunday, 4 December 2016

    Lucky Numbers

    I haven't devoted a entire post to lucky numbers before, even though I have mentioned them (Prime Number Chains). They occur with about the same frequency as prime numbers but whereas WolframAlpha makes a note of prime numbers, it does not mention lucky numbers. So far they just pass by unnoticed. For the sake of completeness, let's define a lucky number once again (taken from WolframAlpha):
    Write out all odd numbers: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, .... The first odd number >1 is 3, so strike out every third number from the list: 1, 3, 7, 9, 13, 15, 19, .... The first odd number greater than 3 in the list is 7, so strike out every seventh number: 1, 3, 7, 9, 13, 15, 21, 25, 31, ....  
    Numbers remaining after this procedure has been carried out completely are called lucky numbers. The first few are 1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, ... (OEIS A000959). Many asymptotic properties of the prime numbers are shared by the lucky numbers. The asymptotic density is 1/lnN, just as the prime number theorem, and the frequency of twin primes and twin lucky numbers are similar. A version of the Goldbach conjecture also seems to hold.
    The OEIS site also has a list of lucky numbers between 1 and 200000. I've extracted a list of those that are coming up for me:


    2495th lucky number: 24727
    2496th lucky number: 24729
    2497th lucky number: 24733 lucky and prime
    2498th lucky number: 24739
    2499th lucky number: 24741
    2500th lucky number: 24759
    2501st lucky number: 24763 lucky and prime
    2502nd lucky number: 24771
    2503rd lucky number: 24783
    2504th lucky number: 24789
    2505th lucky number: 24805
    2506th lucky number: 24811
    2507th lucky number: 24829
    2508th lucky number: 24831
    2509th lucky number: 24843
    2510th lucky number: 24855
    2511th lucky number: 24865
    2512th lucky number: 24873
    2513th lucky number: 24877 lucky and prime
    2514th lucky number: 24895
    2515th lucky number: 24907 lucky and prime
    2516th lucky number: 24909
    2517th lucky number: 24933
    2518th lucky number: 24951
    2519th lucky number: 24957
    2520th lucky number: 24963
    2521st lucky number: 24985
    2522nd lucky number: 24991

    I'll begin entering these into my calendar so that I'm reminded on what numbers are lucky as they occur.

    Tuesday, 28 June 2016

    Mater Ticket Numbers


    Today I received my ticket numbers in the soon-to-be-drawn Mater Prize Home and naturally I scrutinised the fifteen numbers (8539837 to 8539851) that I had been assigned. It turns out that there is one prime number in that range: 8539847. It's too large to show up in the Online Encyclopaedia of Integer Sequences (OEIS) but I discovered the following interesting features of the number:
    • the first four digits 8539 form a prime number
    • the digit sequence 39847 forms a prime number
    • the digit sequence 539 factorises to 7^2×11
    • the digit sequence 847 factorises to 7×11^2
    • no digit is repeated except for 8 which occurs twice, suggestive of 88
    Now 88 is an interesting number. Here is an extract from the Wikipedia entry:
    Number 88 symbolises fortune and good luck in Chinese culture, since the word 8 sounds similar to the word Fā (发, which implies 发财, or wealth, in Mandarin or Cantonese). The number 8 is considered to be the luckiest number in Chinese culture, and prices in Chinese supermarkets often contain many 8s. The shape of the Chinese character for 8 (八) implies that a person will have a great, wide future as the character starts narrow and gets wider toward the bottom. The Chinese government has been auctioning auto license plates containing many 8s for tens of thousands of dollars. The 2008 Beijing Olympics opened on 8/8/08 at 8 p.m. In addition, 88 is also used to mean "bye bye (拜拜)" in Chinese-language chats, text messages, SMSs and IMs. 88 can be seen as shorthand for 8181, which when pronounced in standard Mandarin is identical to "bye bye".
    Given that the prize draw is on June 30th, it can be assumed that my tickets (purchased yesterday) are amongst the final ones to be issued, so that each ticket has about a 8.5 million to 1 chance of winning. This is approximately the same chance of choosing the six winning numbers on Saturday night's Lotto.

    Tuesday, 12 April 2016

    Prime Number Chains

    Now that I have regular Internet access I can resume scrutiny of my numbered days and today's number happens to be 24481 and prime. OEIS A110059 states that 24481 is the member of a sequence such that it is the smallest prime ending a complete Cunningham Chain of the second kind (2x-1) of length n. See my earlier post about Cunningham Chains. The sequence (up to n=13) is:

    1. 11
    2. 13
    3. 5
    4. 17041
    5. 24481
    6. 12338881
    7. 1065601
    8. 1985902081
    9. 219416417281
    10. 105230562877441
    11. 1422461638625281
    12. 444124661486837761
    13. 3105111850422067201
    Now n=5 for 24481 and so adding 1 and dividing by 2 successively yields 12241, 6121, 3061 and 1531. So the complete chain is:

    1531, 3061, 6121, 12241, 24481

    The number is also a prime of the form 1+2n+3n^2 (OEIS A122430) and for 24481 the value on n is 90.

    This prime number also has the property that it is a number n such that n remains prime through 5 iterations of the function f(x)=3x+10 (OEIS A023338). Applying this function rule yields progressively 73453, 220369, 661117, 1983361 and 5950093 and thus we have the prime number sequence:

    24481, 73453, 220369, 661117, 1983361, 5950093

    It also turns out that 24481 is a lucky number. To remind myself what that means, I've attached this definition from WolframAlpha:
    Write out all odd numbers: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, .... The first odd number >1 is 3, so strike out every third number from the list: 1, 3, 7, 9, 13, 15, 19, .... The first odd number greater than 3 in the list is 7, so strike out every seventh number: 1, 3, 7, 9, 13, 15, 21, 25, 31, .... 
    Numbers remaining after this procedure has been carried out completely are called lucky numbers. The first few are 1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, ... (OEIS A000959). Many asymptotic properties of the prime numbers are shared by the lucky numbers. The asymptotic density is 1/lnN, just as the prime number theorem, and the frequency of twin primes and twin lucky numbers are similar. A version of the Goldbach conjecture also seems to hold.

    So it would seem that 24481 is indeed an interesting number.