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.

A174377 Triangle T(n, k) = n!*q^k/(n-k)! if floor(n/2) > k-1 otherwise n!*q^(n-k)/k!, with q = 3, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 9, 9, 1, 1, 12, 108, 12, 1, 1, 15, 180, 180, 15, 1, 1, 18, 270, 3240, 270, 18, 1, 1, 21, 378, 5670, 5670, 378, 21, 1, 1, 24, 504, 9072, 136080, 9072, 504, 24, 1, 1, 27, 648, 13608, 244944, 244944, 13608, 648, 27, 1, 1, 30, 810, 19440, 408240, 7348320, 408240, 19440, 810, 30, 1
Offset: 0

Views

Author

Roger L. Bagula, Mar 17 2010

Keywords

Comments

Row sums are: {1, 2, 8, 20, 134, 392, 3818, 12140, 155282, 518456, 8205362, ...}.

Examples

			Triangle begins as:
  1;
  1,  1;
  1,  6,   1;
  1,  9,   9,     1;
  1, 12, 108,    12,      1;
  1, 15, 180,   180,     15,       1;
  1, 18, 270,  3240,    270,      18,      1;
  1, 21, 378,  5670,   5670,     378,     21,     1;
  1, 24, 504,  9072, 136080,    9072,    504,    24,   1;
  1, 27, 648, 13608, 244944,  244944,  13608,   648,  27,  1;
  1, 30, 810, 19440, 408240, 7348320, 408240, 19440, 810, 30,  1;
		

Crossrefs

Cf. A159623 (q=1), A174376 (q=2), this sequence (q=3), A174378 (q=4).
Cf. A221954.

Programs

  • Mathematica
    T[n_, k_, q_]:= If[Floor[n/2]>=k, n!*q^k/(n-k)!, n!*q^(n-k)/k!];
    Table[T[n, k, 3], {n,0,12}, {k,0,n}]//Flatten
  • Sage
    f=factorial
    def T(n,k,q): return f(n)*q^k/f(n-k) if ((n//2)>k-1) else f(n)*q^(n-k)/f(k)
    flatten([[T(n,k,3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Nov 28 2021

Formula

T(n, k) = n!*q^k/(n-k)! if floor(n/2) > k-1 otherwise n!*q^(n-k)/k!, with q = 3.
T(n, n-k) = T(n, k).
T(2*n, n) = A221954(n+1). - G. C. Greubel, Nov 28 2021

Extensions

Edited by G. C. Greubel, Nov 28 2021