[seqfan] Re: Most efficient way to construct a list of pandigital palindromic numbers?

William Keith wjk26 at drexel.edu
Mon Dec 7 23:34:22 CET 2009


On Dec 7, 2009, at 5:16 PM, Alonso Del Arte wrote:

> In Mathematica, what is the most efficient way to build a list a 
> pandigital
> palindromic numbers? Even with Mathematica as the only program 
> running, the
> command Permutations[{0,1,2,3,4,5,6,7,8,9}] causes Mathematica to shut 
> down
> the kernel and suggest I quit more programs.
>
> Al

Sounds like memory overflow.  Does whatever you're attempting to do 
with your numbers require that you have all 3.6 million permutations 
available at once, or can you construct your permutations on the fly 
when you need to count or check something?  Could you loop through the 
45 lists of eight of the possible digits, and use the permutations of 
these (a much smaller chunk) headed with the two remaining digits in 
each order?

William Keith





More information about the SeqFan mailing list