cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A108040 Reflection of triangle in A008280 in vertical axis.

This page as a plain text file.
%I A108040 #41 Nov 24 2024 13:52:08
%S A108040 1,1,0,0,1,1,2,2,1,0,0,2,4,5,5,16,16,14,10,5,0,0,16,32,46,56,61,61,
%T A108040 272,272,256,224,178,122,61,0,0,272,544,800,1024,1202,1324,1385,1385,
%U A108040 7936,7936,7664,7120,6320,5296,4094,2770,1385,0,0,7936,15872,23536,30656
%N A108040 Reflection of triangle in A008280 in vertical axis.
%H A108040 Reinhard Zumkeller, <a href="/A108040/b108040.txt">Rows n = 0..120 of triangle, flattened</a>
%H A108040 Dominique Foata and Guo-Niu Han, <a href="http://arxiv.org/abs/1601.04371">André Permutation Calculus; a Twin Seidel Matrix Sequence</a>, arXiv:1601.04371 [math.CO], 2016.
%H A108040 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/SeidelTransform">An old operation on sequences: the Seidel transform</a>.
%H A108040 G. Viennot, <a href="http://www.jstor.org/stable/44165433">Interprétations combinatoires des nombres d'Euler et de Genocchi</a>, Séminaire de théorie des nombres, 1980/1981, Exp.No. 11, p. 41, Univ. Bordeaux I, Talence, 1982.
%H A108040 Wikipedia, <a href="http://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>.
%H A108040 <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>.
%F A108040 a(n,k) = A008280(n,n-k). - _R. J. Mathar_, May 02 2007
%e A108040 This version of the triangle begins:
%e A108040 .............1
%e A108040 ...........1...0
%e A108040 .........0...1...1
%e A108040 .......2...2...1...0
%e A108040 .....0...2...4...5...5
%e A108040 ..16..16..14..10...5...0
%e A108040 Kempner tableau begins:
%e A108040 ....................1
%e A108040 ....................1....0
%e A108040 ...............0....1....1
%e A108040 ...............2....2....1....0
%e A108040 ..........0....2....4....5....5
%e A108040 .........16...16...14...10....5...0
%e A108040 .....0...16...32...46...56...61..61
%e A108040 ...272..272..256..224..178..122..61..0
%e A108040 Column 1,1,1,2,4,14,46,224, ... is A005437.
%e A108040 Column 1,1,5,10,56,178, ... is A005438.
%p A108040 A008281 := proc(h,k) option remember ; if h=1 and k=1 or h=0 then RETURN(1) ; elif h>=1 and k> h then RETURN(0) ; elif h=k then RETURN( A008281(h,h-1)) ; else RETURN( add(A008281(h-1,j),j=h-k..h-1) ) ; fi ; end: A008280 := proc(h,k) if ( h <= 1 ) or ( h mod 2) = 1 then A008281(h,k) ; else A008281(h,h-k) ; fi ; end: A108040 := proc(h,k) A008280(h,h-k) ; end: for h from 0 to 13 do for k from 0 to h do printf("%d, ",A108040(h,k)) ; od ; od ; # _R. J. Mathar_, May 02 2007
%t A108040 max = 11; t[0, 0] = 1; t[n_, m_] /; n<m || m<0 = 0; t[n_, m_] := t[n, m] = Sum[t[n-1, n-k], {k, m}]; tri = Table[t[n, m], {n, 0, max}, {m, 0, n}]; A008280 = {Reverse[#[[1]]], #[[2]]}& /@ Partition[tri, 2] // Flatten[#, 1]&; A108040 = Reverse /@ A008280; A108040 // Flatten (* _Jean-François Alcover_, Jan 08 2014 *)
%t A108040 T[0,0]:=1; T[n_?OddQ,k_]/;0<=k<=n := T[n,k]=T[n,k+1]+T[n-1,k]; T[n_?EvenQ,k_]/;0<=k<=n := T[n,k]=T[n,k-1]+T[n-1,k-1]; T[n_,k_] := 0; Flatten@Table[T[n,k], {n,0,10}, {k,0,n}] (* _Oliver Seipel_, Nov 24 2024 *)
%o A108040 (Haskell)
%o A108040 a108040 n k = a108040_tabl !! n !! k
%o A108040 a108040_row n = a108040_tabl !! k
%o A108040 a108040_tabl = ox False a008281_tabl where
%o A108040   ox turn (xs:xss) = (if turn then reverse xs else xs) : ox (not turn) xss
%o A108040 -- _Reinhard Zumkeller_, Nov 01 2013
%o A108040 (Python) # Uses function seidel from A008281.
%o A108040 def A108040row(n): return seidel(n)[::-1] if n % 2 else seidel(n)
%o A108040 for n in range(8): print(A108040row(n)) # _Peter Luschny_, Jun 01 2022
%Y A108040 See A008280 and A008281 for other versions, additional references, formulas, etc.
%K A108040 nonn,tabl,easy
%O A108040 0,7
%A A108040 _N. J. A. Sloane_
%E A108040 More terms from _R. J. Mathar_, May 02 2007