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.

A275414 Triangle read by rows: T(n,k) is the number of multisets of k ternary words with a total of n letters.

Original entry on oeis.org

3, 9, 6, 27, 27, 10, 81, 126, 54, 15, 243, 486, 297, 90, 21, 729, 1836, 1380, 540, 135, 28, 2187, 6561, 5994, 2763, 855, 189, 36, 6561, 23004, 24543, 13212, 4635, 1242, 252, 45, 19683, 78732, 96723, 59130, 23490, 6996, 1701, 324, 55, 59049, 265842, 368874, 253719
Offset: 1

Views

Author

R. J. Mathar, Jul 27 2016

Keywords

Comments

Ternary analog of A209406. Multiset transformation of A000244.

Examples

			      3
      9       6
     27      27      10
     81     126      54      15
    243     486     297      90      21
    729    1836    1380     540     135      28
   2187    6561    5994    2763     855     189      36
   6561   23004   24543   13212    4635    1242     252      45
  19683   78732   96723   59130   23490    6996    1701     324      55
  59049  265842  368874  253719  111609   36828    9846    2232     405      66
		

Crossrefs

Cf. A144067 (row sums), A000244 (column 1), A027468 (subdiagonal ?).

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
          `if`(min(i, p)<1, 0, add(b(n-i*j, i-1, p-j)*
           binomial(3^i+j-1, j), j=0..min(n/i, p)))))
        end:
    T:= (n, k)-> b(n$2, k):
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Apr 13 2017
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[p > n, 0, If[n == 0, 1, If[Min[i, p] < 1, 0, Sum[b[n - i*j, i-1, p - j]*Binomial[3^i + j - 1, j], {j, 0, Min[n/i, p]}]]]];
    T[n_, k_] := b[n, n, k];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 19 2018, after Alois P. Heinz *)

Formula

T(n,1) = A000244(n).
T(n,k) = Sum_{c_i*N_i=n,i=1..k} binomial(T(N_i,1)+c_i-1,c_i) for 1
G.f.: Product_{j>=1} (1-y*x^j)^(-3^j). - Alois P. Heinz, Apr 13 2017