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!)
A099960 An interleaving of the Genocchi numbers of the first and second kind, A110501 and A005439. 4

%I #41 Aug 03 2021 19:05:00

%S 1,1,1,1,2,3,8,17,56,155,608,2073,9440,38227,198272,929569,5410688,

%T 28820619,186043904,1109652905,7867739648,51943281731,401293838336,

%U 2905151042481,24290513745920,191329672483963,1721379917619200,14655626154768697,141174819474169856

%N An interleaving of the Genocchi numbers of the first and second kind, A110501 and A005439.

%C First column (also row sums) of triangle in A099959.

%C Number of ascent sequences of length n without level steps and with alternating ascents and descents. a(6) = 8: 010101, 010102, 010103, 010201, 010202, 010203, 010212, 010213. - _Alois P. Heinz_, Oct 27 2017

%D Donald E. Knuth, The Art of Computer Programming, Vol. 4, fascicle 1, section 7.1.4, p. 220, answer to exercise 174, Addison-Wesley, 2009.

%H Alois P. Heinz, <a href="/A099960/b099960.txt">Table of n, a(n) for n = 0..500</a>

%H Catalin Zara, <a href="http://arxiv.org/abs/1304.5798">Cardinality of l_1-Segments and Genocchi Numbers</a>, arXiv:1304.5798 [math.CO] (2013)

%F a(n) ~ 2^(5/2) * n^(n+3/2) / (Pi^(n+1/2) * exp(n)). - _Vaclav Kotesovec_, Sep 10 2014

%p with(linalg):rev:=proc(a) local n, p; n:=vectdim(a): p:=i->a[n+1-i]: vector(n,p) end: ps:=proc(a) local n, q; n:=vectdim(a): q:=i->sum(a[j],j=1..i): vector(n,q) end: pss:=proc(a) local n, q; n:=vectdim(a): q:=proc(i) if i<=n then sum(a[j],j=1..i) else sum(a[j],j=1..n) fi end: vector(n+1,q) end: R[0]:=vector(1,1): for n from 1 to 30 do if n mod 2 = 1 then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: seq(R[n][1],n=0..30); # _Emeric Deutsch_

%t g1 = Table[2*(4^n-1)*BernoulliB[2*n] // Abs, {n, 0, 13}]; g2 = Table[2*(-1)^(n-2)*Sum[Binomial[n, k]*(1-2^(n+k+1))*BernoulliB[n+k+1], {k, 0, n}], {n, 0, 13}]; Riffle[g1, g2] // Rest (* _Jean-François Alcover_, May 23 2013 *)

%o (Sage) # Algorithm of L. Seidel (1877)

%o def A099960_list(n) :

%o D = [0]*(n//2+3); D[1] = 1

%o R = []; b = True; h = 1

%o for i in (1..n) :

%o if b :

%o for k in range(h,0,-1) : D[k] += D[k+1]

%o R.append(D[1]); h += 1

%o else :

%o for k in range(1,h, 1) : D[k] += D[k-1]

%o R.append(D[h-1])

%o b = not b

%o return R

%o A099960_list(27) # _Peter Luschny_, Apr 30 2012

%Y Cf. A022493, A099959, A001469, A005439, A138265, A294281.

%K nonn,easy

%O 0,5

%A _N. J. A. Sloane_, Nov 13 2004

%E More terms from _Emeric Deutsch_, Nov 16 2004

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 April 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)