%I #18 Oct 30 2017 22:52:01
%S 1,2,3,10,15,56,210,330,1287,2002,8008,31824,50388,203490,319770,
%T 1307504,2042975,8436285,34597290,54627300,225792840,354817320,
%U 1476337800,6107086800,9669554100,40225345056,63432274896,265182149218,416714805914,1749695026860
%N Number of permutations of zero-one words with A056576(n)-n zeros and n-1 ones.
%H Michael De Vlieger, <a href="/A293308/b293308.txt">Table of n, a(n) for n = 1..2211</a>
%H Mike Winkler, <a href="https://arxiv.org/abs/1709.03385">The algorithmic structure of the finite stopping time behavior of the 3x + 1 function</a>, arXiv:1709.03385 [math.GM], Sep 2017. [see (17) on p. 9]
%F a(n) = ( A056576(n) - 1 )! / ( ( A056576(n) - n )! * ( n - 1)! )
%e a(4) = 5! / ( 2! * 3! ) = 5*4/2 = 10.
%e From _Mike Winkler_, Oct 30 2017: (Start)
%e The next table shows the output using the PARI function NextPermutation(a), (cf. PROG)
%e [0, 0, 1, 1, 1] 1
%e [0, 1, 0, 1, 1] 2
%e [0, 1, 1, 0, 1] 3
%e [0, 1, 1, 1, 0] 4
%e [1, 0, 0, 1, 1] 5
%e [1, 0, 1, 0, 1] 6
%e [1, 0, 1, 1, 0] 7
%e [1, 1, 0, 0, 1] 8
%e [1, 1, 0, 1, 0] 9
%e [1, 1, 1, 0, 0] 10
%e (End)
%t Table[(# - 1)!/((# - n)!*(n - 1)!) &@ Floor[n Log[2, 3]], {n, 30}] (* _Michael De Vlieger_, Oct 06 2017 *)
%o (PARI) /* method used in the linked paper arXiv:1709.03385 */
%o NextPermutation(a) = {i=#a-1; while(!(i<1 || a[i]<a[i+1]), i--); if(i<1, return(0)); k=#a; while(!(a[k]>a[i]), k--); t=a[k]; a[k]=a[i]; a[i]=t; for(k=i+1, (#a+i)/2, t=a[k]; a[k]=a[#a+1+i-k]; a[#a+1+i-k]=t); return(a)}
%o /* example for n = 4 */
%o {j=1; a=[0, 0, 1, 1, 1]; until(a==0, print(a" "j); j++; a=NextPermutation(a))} \\ _Mike Winkler_, Oct 30 2017
%Y Cf. A056576, A100982.
%K nonn
%O 1,2
%A _Frank Ellermann_, Oct 05 2017