World!Of Numbers | |||
Palindromic Primes 6 Page 6 | |||
1 2 3 4 5 Circular Primes Home Primes Undulating Primes Sums of Primes |
[ June 5, 2022 ]
Normal and double Factorials summing up to Palprimes
a playful exploration by Alexandru Petrescu
Here is a table with the first twelve entries.
# | n | a(n) |
---|---|---|
1 | 2 | 2! = 2 |
2 | 11 | 1!+1! = 2 |
3 | 101 | 1!+0!+1! = 3 |
4 | 1221221 | 1!+2!+2!+1!+2!+2!+1! = 11 |
5 | 112111211 | 1!+1!+2!+1!+1!+1!+2!+1!+1! = 11 |
6 | 121111121 | 1!+2!+1!+1!+1!+1!+1!+2!+1! = 11 |
7 | 144010441 | 1!+4!+4!+0!+1!+0!+4!+4!+1! = 101 |
8 | 335414533 | 3!+3!+5!+4!+1!+4!+5!+3!+3! = 313 |
9 | 12444144421 | 1!+2!+4!+4!+4!+1!+4!+4!+4!+2!+1! = 151 |
10 | 14244144241 | 1!+4!+2!+4!+4!+1!+4!+4!+2!+4!+1! = 151 |
11 | 15525152551 | 1!+5!+5!+2!+5!+1!+5!+2!+5!+5!+1! = 727 |
12 | 34254145243 | 3!+4!+2!+5!+4!+1!+4!+5!+2!+4!+3! = 353 |
For more terms and extra info please consult Alexandru's OEIS entry A351622
General illustration from Wikipedia https://en.wikipedia.org/wiki/Factorial
Here is a table with the first twelve entries.
# | n | a(n) |
---|---|---|
1 | 2 | 2!! = 2 |
2 | 3 | 3!! = 3 |
3 | 11 | 1!!+1!! = 2 |
4 | 101 | 1!!+0!!+1!! = 3 |
5 | 131 | 1!!+3!!+1!! = 5 |
6 | 313 | 3!!+1!!+3!! = 7 |
7 | 10301 | 1!!+0!!+3!!+0!!+1!! = 7 |
8 | 11311 | 1!!+1!!+3!!+1!!+1!! = 7 |
9 | 13331 | 1!!+3!!+3!!+3!!+1!! = 11 |
10 | 16361 | 1!!+6!!+3!!+6!!+1!! = 101 |
11 | 1085801 | 1!!+0!!+8!!+5!!+8!!+0!!+1!! = 747 |
12 | 1123211 | 1!!+1!!+2!!+3!!+2!!+1!!+1!! = 11 |
More terms are to be found in this list:
2, 3, 11, 101, 131, 313, 10301, 11311, 13331, 16361, 1085801, 1123211, 1160611,
1221221, 1300031, 1311131, 1600061, 1611161, 1805081, 3001003, 3427243,
3670763, 7630367, 100030001, 100131001, 101030101, 105616501, 107636701,
112111211, 113474311, 116505611, 121111121, 142272241, 156757651, 162707261,
164151461, 165101561, 304171403, 305777503, 341171143, 352656253,
374474473, 375070573, 701636107, 705373507, 716555617, 726101627,
730575037, 734474437, 744373447, 744656447, 746505647, 756050657,
761030167, 765404567, 767717767, 10167176101, 10176167101, 10335753301,...
General illustration from Wikipedia https://en.wikipedia.org/wiki/Double_factorial
[ January 11, 2022 ]
Concatenating Ascending and then Descending Palindromes
further explored by Patrick De Geest
Recently I came in contact with some Yahoo.Groups.PrimeForm messages from September 2010
from Phil Carmody and David Broadhurst.
Phil set out to look for palindromic primes consisting of the concatenation of the sequence
of 'palindromes' from 1 up to a middle term, and then back down to 1 again. He thereby coined these
palindromes Palindache Numbers for obvious Smarandache reasons.
I de-archived these four messages and transformed them in readable webpages.
Message 10558 Message 10561 Message 10562 Message 10585
Soon afterwards David found the first Pseudoprime or Probable Prime (PRP)
It is [ 2008, 1008001, 21233 ] ('0' is our first palindrome!).
This says that the middle term is 1008001 and thus the 2008th palindrome, and counts in total 21233 digits !
Neil Sloane picked this number up and mentioned it in sequence A261570 in August 2015.
Unfortunately no program was published, so I will give it a try in Pari/gp.
It is a combination of the codes I wrote for the ascending/descending cases in Wonplate 214.
Here is my "poor man's" version.
{ cnt=0; x=[];y=[]; for(i=1,10000000, p=digits(i); marque=0; lp=length(p); if(Vecrev(p)==p, x=concat(x,p); y=concat(p,y); cnt+=1; marque=1; ); if(marque==1, z=fromdigits(concat(x,y[lp+1..length(y)])); print(cnt," ",i); write("C:/pari/Palindache.txt", z ); ); ); }
This program creates a file ('Palindache.txt') with all the candidates in standby mode.
Its size is quite substantial if you went up to 10 million (857.339 kB).
Now use for instance 'Pfgw64' which can cope with these large input numbers for the actual
(pseudo)prime or 3-PRP! search. The following command line will do the trick.
After some time David Broadhurst's find (middle term being the 2008th palindrome) shows up in the logfile 'pfgw.log'.
I wonder if we can find a companion for 1008001 !?
Also, have you noted that 1008001 is itself a palindromic prime (the 115th) ! Can we talk here about a doubly palindache...
If there is a second PRP then the middle term palindrome must be greater than 10000000 [ Jan 28,2022 ].
The size of the candidate has now increased to 147,108 digits and takes 220 seconds per number to test for PRP.
[ February 3, 2022 ]
Concatenating Descending and then Ascending Palindromes
further explored by Patrick De Geest
Astute readers will already have remarked that there is also the inverse version of
the concatenation as described in above section. Because we can also start with '1' as
our first option middle term and concatenate the growing palindromes on either side
until a palindromic prime emerges.
Option two is of course with '0' as middle term. I'll explore that case as well.
{ cnt=0; x=[];y=[1]; for(i=2,10000000, p=digits(i); marque=0; if(Vecrev(p)==p, ld=p[length(p)]; x=concat(x,p); y=concat(p,y); cnt+=1; marque=1; ); if((marque==1)&&(ld==1||ld==3||ld==7||ld==9), z=fromdigits(concat(y,x)); print(cnt," ",i); write("C:/pari/Desc1Asc.txt", z ); ); ); }
So far but promptly only one palindromic (probable) prime popped up (note the 'p'alliteration...) it is 909 or the 100th palindrome ('0' is our first palindrome!).
[ 909898888878... ...2211987654321234567891122... ...878888898909 ] (with 539 digits) [ 100, 909, 539 ].
The left and right palindrome reached now 9999999 (147,113 digits) and no second (probable) prime found.
{ cnt=0; x=[];y=[0]; for(i=1,10000000, p=digits(i); marque=0; if(Vecrev(p)==p, ld=p[length(p)]; x=concat(x,p); y=concat(p,y); cnt+=1; marque=1; ); if((marque==1)&&(ld==1||ld==3||ld==7||ld==9), z=fromdigits(concat(y,x)); print(cnt," ",i); write("C:/pari/Desc0Asc.txt", z ); ); ); }
[ 101998877... ...221198765432101234567891122... ...778899101 ] (with 539 digits) [ 20, 101, 61 ].
The first number (also prime) is rather trivial it is the 20th palindrome 101 or [ 20, 101, 61 ] ('0' is our first palindrome!)
but then nothing for a long time.
The left and right palindrome reached now 9999999 (147,115 digits) and no second (probable) prime found.
Of course these kind of numbers grow very rapidly in size
and the probability that they hit a prime becomes denser and denser.
One day I hope nevertheless to hit a jackpot.
[ February 14, 2022 ]
Concatenating Descending and then Ascending
“Palindromes Primes”
further explored by Patrick De Geest
Let me go a step further now and consider the case of concatenating
not just palindromes but palindromic primes (abbreviated to palprimes).
The smallest palprime is '2'.
Ascending from this '2' towards a 'middle term palprime' and then descending back to '2'
obviously generates only even composites. Not very interesting.
And dropping the outer '2's so that we have outer '3's feels a bit like cheating.
Not my cup of tea...
But descending from a palprime PP down to our '2' as middle term and then
ascending towards our chosen palprime PP again gives us plentiful of candidates.
So let me start programming for them using Pari/gp.
[ 10111753235711101 ] a composite example!
{ cnt=1; x=[];y=[2]; forprime(i=3,oo, p=digits(i); marque=0; if(Vecrev(p)==p, ld=p[length(p)]; x=concat(x,p); y=concat(p,y); cnt+=1; marque=1; ); if((marque==1)&&(ld==1||ld==3||ld==7||ld==9), z=fromdigits(concat(y,x)); print(cnt," ",i); write("C:/pari/Desc2Asc.txt", z ); ); ); }
The first palprime of this genre has 95 digits and start with the 19th palprime 919.
[ 91979778775772738337335331319118115113110111753235711101131151181191313353373383727757787797919 ] 919 or [ 19, 919, 95 ]
The left and right palprime reached now 1129 929 9211 (135,621 digits) and still no second (probable) prime found.
[ TOP OF PAGE]