[seqfan] Re: b-files for apparently matching sequences?

Peter Pein petsie at dordos.net
Sat Jul 3 21:20:31 CEST 2010


Am Wed, 30 Jun 2010 10:34:44 +0200
schrieb Joerg Arndt <arndt at jjj.de>:

...
> More general, a recurrence for the number of perms where
> p(i)-i lies in a prescribed finite(!) set \in \ZZ.
> (again, a script to enumerate these is easy to write,
> I can do this if required).
> 
>...

I tried it for even i-p(i) with Mathematica [1] and came to A010551 [2]
for n>=1.

Should this property of A010551 be added to the comments? I've got no
proof :-(
Maybe sth. like "_apparently_ the count of permutations of {1,..,n}
with all {p(i) - i; i = 1 .. n} even"?

Thanks,
Peter

[1] In[1]:= A010551[n_]:=Module[{an = 0},
  Hold[Do] @@ Prepend[
    Table[{x[i],
      Hold[Complement][Range[Mod[i, 2, 1], n, 2],
        x /@ Range[i - 1]]},
    {i, n}],
    Hold[an++]
  ]//ReleaseHold;
an]

In[2]:= Table[A010551[k],{k,11}]

Out[2]= {1,1,2,4,12,36,144,576,2880,14400,86400}

In[3]:= ak = Assuming[k\[Element]Integers && k>=1,
  FindSequenceFunction[%, k] // FullSimplify
]
Out[3]= 2^(2 (2-k+Floor[1/2 (-3+k)]+Floor[k/2])) Floor[k/2]!
 Gamma[3+Floor[1/2 (-3+k)]]

In[4]:= Table[ak,{k,20}]
Out[4]=
{1, 1, 2, 4, 12, 36, 144, 576, 2880, 14400, 86400, 518400, 3628800,
25401600, 203212800, 1625702400, 14631321600, 131681894400,
1316818944000, 13168189440000}


[2] http://oeis.org/classic/A010551




More information about the SeqFan mailing list