[seqfan] Re: Most efficient way to construct a list of pandigital palindromic numbers?
Hans Havermann
pxp at rogers.com
Tue Dec 8 05:12:49 CET 2009
Douglas McNeil:
> Does Mma have an idiom for permutations equivalent to python iterators
> which step through a loop without constructing it?
I don't know Python but I was looking at sequential-permutation
operators in Mathematica earlier and there are "Combinatorica" add-on
functions such as NextPermutation[p] which gives the permutation
following p in lexicographic order, and UnrankPermutation[n,l] (it was
NthPermutation[n,l] in older versions of Mathematica) which gives the
n-th permutation in the lexicographic list of permutations of list l.
> (For the record, I find 78695 19-digit numbers.)
Quick, how many 20-digit numbers? ;)
More information about the SeqFan
mailing list