Superseeker fails on simple recursion?

Pfoertner, Hugo Hugo.Pfoertner at muc.mtu.de
Mon Jan 13 14:55:34 CET 2003


SeqFans,

I was a little bit surprised, that superseeker did not find results
for the following sequences arising as operation counts
of a program for lexicographic permutation generation
See http://www.randomwalk.de/sequences/lpgcount.txt

All sequences are defined by a simple recursion of the form
a(3)=constant (0 in most cases),
a(n)=n*a(n-1) + f(n) for n>=4 (f(n) constant, linear, quadratic)

the [] part was submitted to superseeker


0, [4, 25, 156, 1099, 8800, 79209], 792100, 8713111,
104557344, 1359245485
defined by a(3)=0, a(n) = n*a(n) + n for n>=4
will be submitted as A079750

0, 1, [6, 37, 260, 2081, 18730], 187301, 2060312,
24723745, 321408686
a(3)=0, a(n) = n * a(n-1) + 1 for n>=4 (really easy ;-)
(A079751)

0, [2, 13, 82, 579, 4638, 41749], 417498, 4592487,
55109854, 716428113
a(3)=0, a(n) = n * a(n-1) + n - 2 for n>=4
(A079752)

0, [3, 21, 136, 967, 7757], 69841, 698446, 7682951,
921195467, 1198541137
a(3)=0, a(n)= n*a(n-1) + (n-1)*(n-2)/2 for n>=4
(A079753)

0, [1, 8, 54, 388, 3119, 28092, 280948, 3090464],
37085613, 482113024
a(3)=0, a(n) = n*a(n-1) + (n-2)*(n-3)/2 for n>=4
(A079754)


Total number of element comparisons in the streamlined
version of Knuth's algorithm L (from TAOCP vol 4)
needed to create all permutations of n distinct elements:

[11,54,285,1731,12145,97196,874809],8748145,
96229661,1154756010,15011828221,210165595199
a(3)=11, a(n) = n*a(n-1) + n*(n+1)/2 for n>=4
(submitted as A079884)

BTW, this gives an average asymptotic number of 2.410756 comparisons
per generated permutation for large n. 

I would attribute the "easy" keyword to all those sequences
and would hesitate to submit them, unless they had
the "operation count" meaning.
But if superseeker tried "VERY hard to find an explanation"
and came out with nothing....?

Hugo Pfoertner
http://www.pfoertner.org/ 





More information about the SeqFan mailing list