login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of 5 up, 5 down, 5 up, ... permutations of length 5n+1.
1

%I #14 Oct 16 2017 02:01:46

%S 1,1,252,578005,6190034016,214265281290061,19157603395806362772,

%T 3800502511986185228829385,1498722661993096106927612109936,

%U 1081056808393919319749313795137642521,1336319624105519211256870506149168604698792

%N Number of 5 up, 5 down, 5 up, ... permutations of length 5n+1.

%D P. R. Stein, personal communication.

%H Alois P. Heinz, <a href="/A259452/b259452.txt">Table of n, a(n) for n = 0..100</a>

%H P. R. Stein & N. J. A. Sloane, <a href="/A005981/a005981.pdf">Correspondence, 1975</a>

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

%p t=5, b(o-j, u+j-1, 1), b(u+j-1, o-j, t+1)), j=1..o))

%p end:

%p a:= n-> b(0, 5*n+1, 0):

%p seq(a(n), n=0..10); # _Alois P. Heinz_, Jul 02 2015

%t k = 5; b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[If[t == k, b[o - j, u + j - 1, 1], b[u + j - 1, o - j, t + 1]], {j, 1, o}]]; Array[b[0, k # + 1, 0] &, 10] (* _Michael De Vlieger_, Oct 15 2017, after _Jean-François Alcover_ at A005983 *)

%Y Cf. A005981-A005983.

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Jun 28 2015

%E More terms from _Alois P. Heinz_, Jul 02 2015