login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262241 Number of ordered pairs (p,q) of permutations of [n] with complementary up-down signatures and p(1)=q(1) if n>0. 4

%I #11 Aug 30 2021 06:39:18

%S 1,1,0,2,12,144,2456,58376,1836064,73967072,3714221440,227511703296,

%T 16699185465088,1446996011652864,146157945571218944,

%U 17023105015524481536,2264733463688117325824,341323210761171895406592,57851227793596711612702720

%N Number of ordered pairs (p,q) of permutations of [n] with complementary up-down signatures and p(1)=q(1) if n>0.

%C 1 < p(1) = q(1) < n for n > 1.

%H Alois P. Heinz, <a href="/A262241/b262241.txt">Table of n, a(n) for n = 0..110</a>

%e a(1) = 1: (1,1).

%e a(2) = 0.

%e a(3) = 2: (213,231), (231,213).

%e a(4) = 12: (2134,2431), (2143,2314), (2143,2413), (2314,2143), (2413,2143), (2431,2134), (3124,3421), (3142,3412), (3241,3412), (3412,3142), (3412,3241), (3421,3124).

%p b:= proc(u, o, h) option remember; `if`(u+o=0, 1,

%p add(add(b(u-j, o+j-1, h-i), i=1..h), j=1..u)+

%p add(add(b(u+j-1, o-j, h+i-1), i=1..u+o-h), j=1..o))

%p end:

%p a:= n-> `if`(n=0, 1, add(b(j-1, n-j, n-j), j=1..n)):

%p seq(a(n), n=0..20);

%t b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1,

%t Sum[Sum[b[u - j, o + j - 1, h - i], {i, h}], {j, u}] +

%t Sum[Sum[b[u + j - 1, o - j, h + i - 1], {i, u + o - h}], {j, o}]];

%t a[n_] := If[n == 0, 1, Sum[b[j - 1, n - j, n - j], {j, n}]];

%t Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, Aug 30 2021, after _Alois P. Heinz_ *)

%Y Cf. A060350, A262233, A262234.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Sep 15 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 04:33 EDT 2024. Contains 372227 sequences. (Running on oeis4.)