World!Of Numbers |
|||
[ January 9, 2022 ] We start from 1 and string together the next palindrome to it, For the ascending case I soon discovered manually these two nice primes ! 12345678911223344556677 Is this a rare and lonely couple 77 and 101 ? This is how I tackle the topic. I use Pari/gp { cnt=0; x=[]; for(i=1,10000000, p=digits(i);marque=0;ld=p[length(p)]; if(Vecrev(p)==p, x=concat(x,p); cnt+=1; marque=1; ); if((ld==1||ld==3||ld==7||ld==9)&&marque==1, print(cnt," ",i); write("C:/pari/Smpal.txt", fromdigits(x)); ); ); } Then I pass the torch to 'Pfgw64' which will quickly determine pfgw64 "C:\pari\Smpal.txt"
and finally check the logfile ('pfgw.log') for any (pseudo)primes. For the descending case I soon discovered manually these three nice primes ! 1311211111019988... ... 332211987654321 494484474464454444... ...332211987654321 747737727717707696... ... 332211987654321 This looks like a nice but isolated (?) trio 131 , 494 and 747 . Here is the program with adaptations for the descending case. { cnt=0; x=[]; for(i=1,10000000, p=digits(i);marque=0; if(Vecrev(p)==p, x=concat(p,x); cnt+=1; marque=1; ); if(marque==1, print(cnt," ",i); write("C:/pari/Rsmpal.txt", fromdigits(x));); ); } to be used thereafter by Pfgw64 for the actual (pseudo)prime search. pfgw64 "C:\pari\Rsmpal.txt"
You only need to check now the logfile ('pfgw.log') for any results. And the program already delivers! The fourth number is 82328 . Lastly there is the combined case of ascending towards Let us call these palindromes Palindache Numbers . Here we are dealing with Palindromic (pseudo)Primes | |||
A000214 Prime Curios! Prime Puzzle Wikipedia 214 Le nombre 214 |
[ TOP OF PAGE]