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.

A247976 Triangle read by rows: T(n,k) generated by m-gon expansions in the case of odd m with "vertex to vertex" version or even m with "vertex to side" version. (See comment for details.)

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 7, 21, 35, 35, 21, 7
Offset: 1

Views

Author

Kival Ngaokrajang, Sep 28 2014

Keywords

Comments

Refer to triangle expansions in A061777 and A101946 (and their companions for m-gons) which are "vertex to vertex" and "vertex to side" versions respectively. The label values at each iteration can be arranged as triangle. Any m-gon can also be arranged as the same triangle with conditions: (i) m is odd and expansion is "vertex to vertex" version or (ii) m is even and expansion is "vertex to side" version. m*Sum_{i=1..k}T(n,k) gives the total label value in n-th iteration. See illustration.

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,  2;
  1,  2,  1,  2;
  1,  2,  1,  3,  3;
  1,  3,  3,  1,  3,  3;
  1,  3,  3,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  5, 10, 10,  5;
  1,  5, 10, 10,  5,  1,  5, 10, 10, 5;
  ...
		

Crossrefs

Rows sum: A027383.
Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
Vertex to vertex: A061777, A247618, A247619, A247620.
Vertex to side: A101946, A247903, A247904, A247905.
Cf. A074909.

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1, 1, If[k==n, Floor[(n+1)/2], If[OddQ[n], If[k<=(n+ 1)/2, T[n-1, k], T[n-1, k-1] + T[n-1, k]], If[kG. C. Greubel, Feb 18 2022 *)
  • Sage
    @CachedFunction
    def T(n,k): # A247976
        if (k==1): return 1
        elif (k==n): return (n+1)//2
        elif (n%2==1): return T(n-1,k) if (k <= (n+1)/2) else T(n-1,k-1) + T(n-1,k)
        else: return T(n-1,k-1)+T(n-1,k) if (k < (n+2)/2) else T(n,k-n/2)
    flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Feb 18 2022

Formula

T(n, k) = ( T(n-1, k) if k <= (n+1)/2 otherwise T(n-1, k-1) + T(n-1, k) ) for odd n rows, ( T(n-1, k-1) + T(n-1, k) if k < (n+2)/2 otherwise T(n, k - n/2) ) for even n rows, with T(n, 1) = 1 and T(n, n) = floor((n+1)/2). - G. C. Greubel, Feb 18 2022