Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 May 18 2017 09:57:49
%S 1,1,3,14,85,671,6405,72302,940005,13846117,227837533,4142793511,
%T 82488063476,1785049505682,41715243815059,1046997553798894,
%U 28089178205661221,802173732190546289,24296253228394108980,777918130180655893150,26253270588637259772768
%N Number of weak up-down sequences of length n and values in {1,2,...,n}.
%H Alois P. Heinz, <a href="/A276313/b276313.txt">Table of n, a(n) for n = 0..413</a>
%F a(n) ~ exp(1/2) * 2^(n+2) * n^n / Pi^(n+1). - _Vaclav Kotesovec_, Aug 30 2016
%e a(0) = 1: the empty sequence.
%e a(1) = 1: 1.
%e a(2) = 3: 11, 12, 22.
%e a(3) = 14: 111, 121, 122, 131, 132, 133, 221, 222, 231, 232, 233, 331, 332, 333.
%e a(4) = 85: 1111, 1112, 1113, 1114, 1211, ..., 4423, 4424, 4433, 4434, 4444.
%p b:= proc(n, k, t) option remember; `if`(n=0, 1,
%p add(b(n-1, k, k-j), j=1..t))
%p end:
%p a:= n-> b(n, n+1, n):
%p seq(a(n), n=0..25);
%t b[n_, k_, t_] := b[n, k, t] = If[n==0, 1, Sum[b[n-1, k, k-j], {j, 1, t}]];
%t a[n_] := b[n, n+1, n];
%t Table[a[n], {n, 0, 25}](* _Jean-François Alcover_, May 18 2017, translated from Maple *)
%Y A diagonal of A050446, A050447.
%Y Cf. A276312.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Aug 29 2016