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.

A338654 T(n, k) = 2^n * Product_{j=1..k} (j/2)^((-1)^(j - 1)). Triangle read by rows, for 0 <= k <= n.

Original entry on oeis.org

1, 2, 1, 4, 2, 2, 8, 4, 4, 6, 16, 8, 8, 12, 6, 32, 16, 16, 24, 12, 30, 64, 32, 32, 48, 24, 60, 20, 128, 64, 64, 96, 48, 120, 40, 140, 256, 128, 128, 192, 96, 240, 80, 280, 70, 512, 256, 256, 384, 192, 480, 160, 560, 140, 630, 1024, 512, 512, 768, 384, 960, 320, 1120, 280, 1260, 252
Offset: 0

Views

Author

Peter Luschny, Apr 22 2021

Keywords

Examples

			Triangle start:
                             [0] 1
                           [1] 2, 1
                          [2] 4, 2, 2
                        [3] 8, 4, 4, 6
                      [4] 16, 8, 8, 12, 6
                  [5] 32, 16, 16, 24, 12, 30
                [6] 64, 32, 32, 48, 24, 60, 20
             [7] 128, 64, 64, 96, 48, 120, 40, 140
         [8] 256, 128, 128, 192, 96, 240, 80, 280, 70
     [9] 512, 256, 256, 384, 192, 480, 160, 560, 140, 630
		

Crossrefs

T(n, 0) = A000079(n), T(n, n) = A056040(n), T(2*n, n) = A253665(n).
Cf. A328002 (row sums), A163590.

Programs

  • Maple
    T := (n, k) -> 2^n*mul((j/2)^((-1)^(j - 1)), j = 1 .. k):
    seq(seq(T(n, k), k=0..n), n=0..9);
    # Recurrence:
    Trow := proc(n) if n = 0 then return [1] fi; Trow(n - 1);
    n^irem(n, 2) * (4/n)^irem(n + 1, 2) * %[n]; [op(2 * %%), %] end:
    seq(print(Trow(n)), n = 0..9);
  • PARI
    t(n, k) = 2^n * prod(j=1, k, ((j/2)^((-1)^(j - 1))))
    trianglerows(n) = for(x=0, n-1, for(y=0, x, print1(t(x, y), ", ")); print(""))
    /* Print upper 10 rows of the triangle as follows: */
    trianglerows(10) \\ Felix Fröhlich, Apr 22 2021