%I #34 Jan 14 2024 12:38:39
%S 1,1,1,1,3,6,26,71,413,1456,10576,45541,397023,2020656,20551376,
%T 120686411,1402815833,9336345856,122087570176,908138776681,
%U 13194844482843,108480272749056,1733786041150976,15611712012050351,272197308765744053,2664103110372192256
%N The 2-Up sequence: formed from final entries in rows of A058257.
%H Alois P. Heinz, <a href="/A058258/b058258.txt">Table of n, a(n) for n = 0..200</a>
%H J. M. Luck, <a href="http://arxiv.org/abs/1309.7764">On the frequencies of patterns of rises and falls</a>, arXiv:1309.7764 [cond-mat.stat-mech], 2013-2014.
%F E.g.f. (J. M. Luck, 2013): 1 + ((sin(x) - cos(x) + 1) * (cosh(x)-1) + (sin(x) + cos(x) + 1) * sinh(x)) / ((1 + cosh(x)*cos(x))). - _Vaclav Kotesovec_, Sep 06 2014
%F a(n) ~ c * n! / r^n, where r = A076417 = 1.8751040687119611664453... is the root of the equation cosh(r)*cos(r) = -1, and c = 4*cot(r/2)/r = 1.56598351207925... if n is even, c = 4*cot(r/2)^2/r = 1.14958147083780... if n is odd. - _Vaclav Kotesovec_, Sep 06 2014
%p b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=2,
%p 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, n, 0):
%p seq(a(n), n=0..30); # _Alois P. Heinz_, Oct 02 2013
%t b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[If[t == 2, b[o-j, u+j-1, 1], b[u+j-1, o-j, t+1]], {j, 1, o}]] ;a[n_] := b[0, n, 0]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Feb 03 2014, after _Alois P. Heinz_ *)
%t CoefficientList[Series[1 + ((Sin[x]-Cos[x]+1) * (Cosh[x]-1) + (Sin[x]+Cos[x]+1) * Sinh[x]) / ((1+Cosh[x]*Cos[x])),{x,0,20}],x] * Range[0,20]! (* _Vaclav Kotesovec_, Sep 06 2014 *)
%Y Cf. A005981, A076417.
%Y Column k=2 of A229892.
%K nonn,easy,nice
%O 0,5
%A _N. J. A. Sloane_, Dec 06 2000
%E More terms from Larry Reeves (larryr(AT)acm.org), Dec 12 2000
|