World!OfNumbers |
HOME plate WON | |
||
---|---|---|---|

Palindromic Subsetsof Concatenated Sequences | |||

Palindromic numbers are numbers which read the same from

Index Nr | Palindromic Subsets of Concatenated Sequences | Length |
---|---|---|

Concatenated Prime Sequence | ||

3 | 3511|3517|3527|3529|3533|3539|3541|3547|3557 |
9 |

2 | 2741|2749|2753|2767|2777|2789|2791|2797|2801 |
7 |

1 | 3|5|7|11|13|17|19|23|29|31|37|41|43|47|53 |
5 |

You are kindly invited to find larger palindromes as substrings

in 'prime'- or 'other' sequence concatenations !

[ *November 25, 2003* ]

Contribution by Dw (email)

I wrote a program to find such palindromic sequences with "record length",

meaning, to find a sequence at least longer than the previous sequence found,

and start with length 1.

The results for the first 98654 primes were:

(flank [8, 11] ) #|11|# Length 2

(center [8, 12] ) #|11|1#3| Length 3

(center [19, 26] ) |1#9|23|29|# Length 5

(center [234, 243] ) |31#7|331|337|# Length 7 *

(center [647, 658] ) |100#9|1013|1019|# Length 9 *

(flank [6019, 6030] ) |1010#3|10111|1013#3| Length 10

(center [18007, 18020] ) |2991#7|29921|29927|# Length 11

(center [79043, 79058] ) |13828#9|138311|138319|# Length 13

(flank [158566, 158581] ) |2#77279|277297|277#301| Length 14

Flank palindromes are ones which have two center digits, e.g 7447.

Center palindromes are ones which have only one center digit, e.g 74347.

The vertical line | pipe symbol separates the respective digits,

while the # marks show the start and end of the palindromic sequence.

For example, for the length 5 palindrome, the bars show that the primes

involved are 19, 23, and 29. The palindrome itself is 92329.

The numbers in brackets show the position of the palindromic sequence in a

string of the numbers concatenated and separated with the vertical line

symbols mentioned above.

* Note that it found an earlier length 7 and length 9 sequence than the ones

on your example table.

[ *December 2, 2003* ]

Suite by Dw (email)

I replaced the prime number detection with a sieve and did some other tweaks,

though I'm running it close to the memory limit given by the sieve, so I

probably won't find any larger palindromic concatenations of prime numbers

for a while.

The relevant program output is:

New record found of size 19.

(center [706236, 706257] )#|1292113|1292131|12921#41|

New record found of size 21.

(center [865835, 865858] )|157508#3|1575113|1575131|157513#7|

New record found of size 22.

(flank [9612474, 9612498] )#|18008113|18008131|180081#53|

New record found of size 24.

(flank [10621868, 10621894] )|1988911#7|19889137|19889173|1988917#9|

New record found of size 26.

(flank [30358705, 30358734] )|581184#97|58118537|58118573|58118579|#

New record found of size 27 ( Note by PDG **916282611716282617116282619** is a palindromic prime ! ).

(center [84723469, 84723498] )|16282610#9|162826117|162826171|16282619#9|

New record found of size 34.

(flank [122423120, 122423157] )#|234843239|234843277|234843293|2348432#99|

String length: 187895520

Last prime: 362559997

First I use a Sieve of Eratosthenes to get all primes up to the

maximum prime number mentioned as "last prime". I then dump all the prime

numbers found by that method into a linked list and erase the sieve array so

I'll have enough memory for the next step. This consists of concatenating the

printed equivalents of the numbers between |s -- e.g 2, 3, 5 becomes |2|3|5.

Once that is done I run a function to find palindromes on every position in

that string and print "New record found" if the longest palindrome it found

originating from that position was larger than the last record.

I have 512M RAM and 256M virtual memory, and the boundary for how

large a sieve I can have (unless I do tricks like using only odd numbers) is

about where I am now.

The modularity of the code would make it simple to create analogous

versions for other sieve based numbers, eg luckies.

Index Nr | Palindromic Subsets of Concatenated Sequences (Dw) | Length |
---|---|---|

Concatenated Prime Sequence | ||

? | ?|?|?|?|?|?|?|? | ? |

16 | 234843227|234843233|234843239|234843277|234843293|234843299|234843311|234843313 | 34 |

15 | 162826049|162826091|162826109|162826117|162826171|162826199|162826231|162826243916282611716282617116282619 is PRIME ! | 27 |

14 | 58118381|58118449|58118497|58118537|58118573|58118579|58118591|58118603 | 26 |

13 | 19889083|19889087|19889117|19889137|19889173|19889179|19889189|19889203 | 24 |

12 | 18008071|18008093|18008113|18008131|18008153|18008161|18008167 | 22 |

11 | 1575031|1575071|1575083|1575113|1575131|1575137|1575139|1575143 | 21 |

10 | 1292089|1292099|1292113|1292131|1292141|1292143|1292149 | 19 |

9 | 277261|277273|277279|277297|277301|277309|277331 | 14 |

8 | 138251|138283|138289|138311|138319|138323|138337 | 13 |

7 | 29879|29881|29917|29921|29927|29947|29959 | 11 |

6 | 10093|10099|10103|10111|10133|10139|10141 | 10 |

5 | 991|997|1009|1013|1019|1021|1031 | 9 |

4 | 311|313|317|331|337|347|349 | 7 |

3 | 13|17|19|23|29|31|37 | 5 |

2 | 5|7|11|13|17|19 | 3 |

1 | 5|7|11|13|17|19 | 2 |

[ *November, 2004* ]

Carlos Rivera asked in his Puzzle 289 for

Giovanni Resta and J. K. Andersen engaged to the puzzle using their own methods

and insights and came up with some __stunning new records__ !

The full story can be read in Carlos excellent puzzle page.

Allow me to duplicate from both puzzlers their two largest palindromic subsequences.

GR got these two solutions which beat the cited with 34 digits by Dw and span 5 primes.

51 = (1666661119 11666661137 11666661173 11666661191 11666661)203

53 = (46735376419 46735376437 46735376473 46735376491 467353764)97

JKA has two palprime record solutions spanning 5 and even 6 consecutive primes.

61 = 108767(976780119 108767976780137 108767976780173 108767976780191 1087679)76780289

105 = 19605310868013506908(9 196053108680135069119 196053108680135069137 196053108680135069173 196053108680135069191 19605310868013506919)7

Found by | Palindromic Subsets of Concatenated Sequences | Length |
---|---|---|

Concatenated Prime Sequence | ||

GR | ?|?|1666661119|11666661137|11666661173|11666661191|11666661203|?|? | 51 |

GR | ?|?|46735376419|46735376437|46735376473|46735376491|46735376497|?|? | 53 |

JKA | ?|?|108767976780119|108767976780137|108767976780173|108767976780191|108767976780289|?|? | 61 |

JKA | ?|?|196053108680135069089|196053108680135069119|196053108680135069137|196053108680135069173|196053108680135069191|196053108680135069197|?|? | 105 |

[ TOP OF PAGE]

Patrick De Geest - Belgium - Short Bio - Some Pictures

E-mail address : pdg@worldofnumbers.com