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.

Original entry on oeis.org

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, 272, 272, 256, 224, 178, 122, 61, 0, 0, 272, 544, 800, 1024, 1202, 1324, 1385, 1385, 7936, 7936, 7664, 7120, 6320, 5296, 4094, 2770, 1385, 0, 0, 7936, 15872, 23536, 30656
Offset: 0

Views

Author

Keywords

Examples

			This version of the triangle begins:
.............1
...........1...0
.........0...1...1
.......2...2...1...0
.....0...2...4...5...5
..16..16..14..10...5...0
Kempner tableau begins:
....................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
...272..272..256..224..178..122..61..0
Column 1,1,1,2,4,14,46,224, ... is A005437.
Column 1,1,5,10,56,178, ... is A005438.
		

Crossrefs

See A008280 and A008281 for other versions, additional references, formulas, etc.

Programs

  • Haskell
    a108040 n k = a108040_tabl !! n !! k
    a108040_row n = a108040_tabl !! k
    a108040_tabl = ox False a008281_tabl where
      ox turn (xs:xss) = (if turn then reverse xs else xs) : ox (not turn) xss
    -- Reinhard Zumkeller, Nov 01 2013
    
  • Maple
    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
  • Mathematica
    max = 11; t[0, 0] = 1; t[n_, m_] /; nA008280 = {Reverse[#[[1]]], #[[2]]}& /@ Partition[tri, 2] // Flatten[#, 1]&; A108040 = Reverse /@ A008280; A108040 // Flatten (* Jean-François Alcover, Jan 08 2014 *)
    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 *)
  • Python
    # Uses function seidel from A008281.
    def A108040row(n): return seidel(n)[::-1] if n % 2 else seidel(n)
    for n in range(8): print(A108040row(n)) # Peter Luschny, Jun 01 2022

Formula

a(n,k) = A008280(n,n-k). - R. J. Mathar, May 02 2007

Extensions

More terms from R. J. Mathar, May 02 2007