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.

User: Ji Young Choi

Ji Young Choi's wiki page.

Ji Young Choi has authored 7 sequences.

A340620 T(n,k) is the number of 4-ary strings of length n+1 with k+1 indispensable digits and a nonzero leading digit with 0 <= k <= n.

Original entry on oeis.org

3, 6, 6, 10, 28, 10, 15, 81, 81, 15, 21, 186, 354, 186, 21, 28, 371, 1137, 1137, 371, 28, 36, 672, 3018, 4836, 3018, 672, 36, 45, 1134, 7023, 16374, 16374, 7023, 1134, 45, 55, 1812, 14829, 47286, 68644, 47286, 14829, 1812, 55, 66, 2772, 29043, 121314, 240021, 240021, 121314, 29043, 2772, 66
Offset: 0

Author

Ji Young Choi, Jan 13 2021

Keywords

Comments

A digit in a string is called indispensable if it is greater than the following digit or equal to the following digits which are eventually greater than the following digit. We also assume that there is an invisible digit 0 at the end of any string. For example, in the string 33102232, the digits 3, 3, 1, 3, and 2 are indispensable (from the left).
T(n,k) is also the number of integers m where the length of base-4 representation of m is n+k and the digit sum of the base-4 representation of 3m is 3(k+1).

Examples

			Triangle begins
   3;
   6,   6;
  10,  28,   10;
  15,  81,   81,   15;
  21, 186,  354,  186,   21;
  28, 371, 1137, 1137,  371,  28;
  36, 672, 3018, 4836, 3018, 672, 36;
  ...
There are 6 4-ary strings (10, 12, 13, 20, 23, 30) of length 2 with 1 indispensable digits and a nonzero leading digit.
There are 6 4-ary strings (11, 21, 22, 31, 32, 33) of length 2 with 2 indispensable digits and a nonzero leading digit.
There are 10 4-ary strings (111, 211, 221, 222, 311, 321, 322, 331, 332, 333) of length 3 with 3 indispensable digits and a nonzero leading digit.
Hence, T(1,0)=6, T(1,1)=6, T(2,2)=10.
		

Crossrefs

Programs

Formula

T(n,k) = A330509(n+1,k+1) - A330509(n,k+1).

Extensions

More terms from Michel Marcus, Jan 19 2021

A330510 Triangle read by rows: T(n,k) is the number of ternary strings of length n+1 with k+1 indispensable digits and a nonzero leading digit, with 0 <= k <= n.

Original entry on oeis.org

2, 3, 3, 4, 10, 4, 5, 22, 22, 5, 6, 40, 70, 40, 6, 7, 65, 171, 171, 65, 7, 8, 98, 356, 534, 356, 98, 8, 9, 140, 665, 1373, 1373, 665, 140, 9, 10, 192, 1148, 3088, 4246, 3088, 1148, 192, 10, 11, 255, 1866, 6294, 11257, 11257, 6294, 1866, 255, 11
Offset: 0

Author

Ji Young Choi, Dec 16 2019

Keywords

Comments

A digit in a string is called indispensable if it is greater than the following digit or equal to the following digits which are eventually greater than the following digit. We also assume that there is an invisible digit 0 at the end of any string. For example, in 7233355548, the digits 7, 5, 5, 5, and 8 are indispensable.
T(n, k) is also the number of integers m where the length of ternary representation of m is n+k and the digit sum of the ternary representation of 2m is 2(k+1).

Examples

			Triangle begins
  2;
  3,   3;
  4,  10,   4;
  5,  22,  22,   5;
  6,  40,  70,  40,   6;
  7,  65, 171, 171,  65,   7;
  ...
There are 4 strings (100, 112, 120, 200) of length 3 with 1 indispensable digits and a nonzero leading digit.
There are 10 strings (101, 102, 110, 121, 122, 201, 202, 210, 212, 220) of length 3 with 2 indispensable digits are a nonzero leading digit.
There are 4 strings (111, 211, 221, 222) of length 3 with 3 indispensable digits and a nonzero leading digit.
Hence T(2,0)=4, T(2,1)=10, T(2,2)=4.
		

Crossrefs

Programs

Formula

T(n, k) = A330381(n+1, k+1) - A330381(n, k+1).

A330509 Triangle read by rows: T(n,k) is the number of 4-ary strings of length n with k indispensable digits, with 0 <= k <= n.

Original entry on oeis.org

1, 1, 3, 1, 9, 6, 1, 19, 34, 10, 1, 34, 115, 91, 15, 1, 55, 301, 445, 201, 21, 1, 83, 672, 1582, 1338, 392, 28, 1, 119, 1344, 4600, 6174, 3410, 700, 36, 1, 164, 2478, 11623, 22548, 19784, 7723, 1170, 45, 1, 219, 4290, 26452, 69834, 88428, 55009, 15999, 1857, 55
Offset: 0

Author

Ji Young Choi, Dec 16 2019

Keywords

Comments

A digit in a string is called indispensable if it is greater than the following digit or equal to the following digits which are eventually greater than the following digit. We also assume that there is an invisible digit 0 at the end of any string. For example, in 7233355548, the digits 7, 5, 5, 5, and 8 are indispensable.
T(n, k) is also the number of integers m where the length of the base-4 representation of m is n and the digit sum of the base-4 representation of 3m is 3k.

Examples

			Triangle begins
  1;
  1,   3;
  1,   9,   6;
  1,  19,  34,  10;
  1,  34, 115,  91,  15;
  1,  55, 301, 445, 201,  21;
  ...
There is 1 string (00) of length 2 with 0 indispensable digits.
There are 9 strings (01, 02, 03, 10, 12, 13, 20, 23, 30) of length 2 with 1 indispensable digit.
There are 6 strings (11, 21, 22, 31, 32, 33) of length 2 with 2 indispensable digits.
Hence T(2,0)=1, T(2,1)=9, T(2,2)=6.
		

Crossrefs

Programs

Formula

T(n, k) = A008287(n, 3k-2) + A008287(n, 3k-1) + A008287(n, 3k).

A330381 Triangle read by rows: T(n,k) is the number of ternary strings of length n with k indispensable digits, with 0 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 5, 3, 1, 9, 13, 4, 1, 14, 35, 26, 5, 1, 20, 75, 96, 45, 6, 1, 27, 140, 267, 216, 71, 7, 1, 35, 238, 623, 750, 427, 105, 8, 1, 44, 378, 1288, 2123, 1800, 770, 148, 9, 1, 54, 570, 2436, 5211, 6046, 3858, 1296, 201, 10, 1, 65, 825, 4302, 11505, 17303
Offset: 0

Author

Ji Young Choi, Dec 12 2019

Keywords

Comments

A digit in a string is called indispensable, if it is greater than the following digit or equal to the following digits which are eventually greater than the following digit. We also assume that there is an invisible digit 0 at the end of any string. For example, in 7233355548, the digits 7, 5, 5, 5, and 8 are indispensable.
T(n, k) is also the number of integers m where the length of the ternary representation of m is less than or equal to n and the digit sum of the ternary representation of 2m is 2k.

Examples

			Triangle begins
  1;
  1,  2;
  1,  5,  3;
  1,  9, 13,  4;
  1, 14, 35, 26,  5;
  1, 20, 75, 96, 45, 6;
  ...
There is 1 string (00) of length 2 with 0 indispensable digits.
There are 5 strings (01, 02, 10, 20, 12) of length 2 with 1 indispensable digit.
There are 3 strings (11, 21, 22) of length 2 with 2 indispensable digits.
Hence T(2, 0) = 1, T(2, 1) = 5, T(2, 2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Map[Sum[Binomial[n, i] Binomial[n - i, # - 2 i], {i, 0, n}] &, 2 k + {-1, 0}], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 23 2019, after Adi Dani at A027907 *)
  • PARI
    A027907(n, k) = if(n<0, 0, polcoeff((1 + x + x^2)^n, k));
    T(n, k) = A027907(n, 2*k-1) + A027907(n, 2*k); \\ Jinyuan Wang, Dec 14 2019

Formula

T(n, k) = A027907(n, 2k-1) + A027907(n, 2k).

Extensions

More terms from Jinyuan Wang, Dec 14 2019

A171996 A(n,k,m) is the number of permutations of an n-set with k disjoint cycles of length less than or equal to m, called the (n,k)-th m-restrained Stirling numbers of the first kind, and denoted by mS_1(n,k). The sequence shows the case of m=3.

Original entry on oeis.org

1, -1, 1, 2, -3, 1, 0, 11, -6, 1, 0, -20, 35, -10, 1, 0, 40, -135, 85, -15, 1, 0, 0, 490, -525, 175, -21, 1, 0, 0, -1120, 2905, -1540, 322, -28, 1, 0, 0, 2240, -12600, 11865, -3780, 546, -36, 1, 0, 0, 0, 47600, -76545, 38325, -8190, 870, -45, 1
Offset: 1

Author

Ji Young Choi, Jan 21 2010

Keywords

Comments

A(n,k,m) is also the (n,k)-th entry in the matrix inverting the matrix consisting of the m-restrained Stirling numbers of the second kind.
Also the Bell transform of the sequence "g(n) = [1,-1,2][n] if n < 3, otherwise 0" (adding 1,0,0,.. as column 0). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016

Examples

			A(1,1,3)=1,  A(1,2,3)=0,   A(1,3,3)=0,   A(1,4,3)=0, ...
A(2,1,3)=-1, A(2,2,3)=1,   A(2,3,3)=0,   A(2,4,3)=0, ...
A(3,1,3)=2,  A(3,2,3)=-3,  A(3,3,3)=1,   A(3,4,3)=0, ...
A(4,1,3)=0,  A(4,2,3)=11,  A(4,3,3)=-6,  A(4,4,3)=1, ...
		

Crossrefs

Cf. A111246, A144633, A171998 (matrix inverse).

Programs

  • PARI
    T(n,k) = (-1)^(n-k)*n!*sum(j=0, k, binomial(j,n-k-j)*binomial(k,j)*3^(-n+k+j)*2^(n-k-2*j)/k!); \\ Jinyuan Wang, Dec 21 2019
  • Sage
    # uses[bell_matrix from A264428]
    # Adds a column 1, 0, 0, 0, ... at the left side of the triangle.
    bell_matrix(lambda n: [1,-1,2][n] if n < 3 else 0, 12) # Peter Luschny, Jan 19 2016
    

Formula

A(n,k,m) = Sum {(-1)^(n-k)*n!} /{1^{k_1}*2^{k_2}*...*m^{k_m}*(k_1!)*(k_2!)*...*(k_m!)}, where k_1 + 2*k_2 + ... + m*k_m = n and k_1 + k_2 + ... + k_m = k.
Recurrence A(n,k,m) = Sum_{i=1..m} (-1)^(i-1)*[n-1]_{i-1}*A(n-i,k-1,m).
A(n,k,m) = A(n-1,k-1,m) - (n-1)*A(n-1,k,m) - (-1)^m(n-1)*(n-2)*...*(n-m)*A(n-m-1,k-1,m).
Generating function f(t) = (1 + t - t^2/2 + t^3/3 + ... + (-1)^(m-1) t^m/m)^x, for an indeterminate x ===> the n-th derivative of f(t) at t=0, f^(n)(0) = Sum_{k=1..n} A(n,k,m)[x]_k, where [x]_k is the k-th falling factorial
T(n,k) = (-1)^(n-k)*n!*Sum_{j=0..k} C(j,n-k-j)*C(k,j)*3^(-n+k+j)*2^(n-k-2*j)/k!. - Vladimir Kruchinin, Oct 02 2019

Extensions

More terms from Peter Luschny, Jan 19 2016

A171998 In general, let A(n,k,m) denote the (n,k)-th entry of the inverse of the matrix consisting of the (n,k)-th m-restrained Stirling numbers of the second kind (-1)^(n-k) times the number of permutations of an n-set with k disjoint cycles of length less than or equal to m, as the (n+1,k+1)-th entry. The sequence shows A(n,k,3), which is a lower triangular matrix, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, -5, 7, 6, 1, -65, -15, 25, 10, 1, -455, -455, 0, 65, 15, 1, -1295, -4725, -1715, 140, 140, 21, 1
Offset: 1

Author

Ji Young Choi, Jan 21 2010

Keywords

Comments

A(n,k,m) also can be expanded for nonpositive integers n and k using the m-restrained Stirling numbers of the first kind.

Examples

			A(1,1,3) = 1, A(1,2,3) = 0, A(1,3,3) = 0, A(1,4,3) = 0, ...
A(2,1,3) = 1, A(2,2,3) = 1, A(2,3,3) = 0, A(2,4,3) = 0, ...
A(3,1,3) = 1, A(3,2,3) = 3, A(3,3,3) = 1, A(3,4,3) = 0, ...
A(4,1,3) = -5, A(4,2,3) = 7, A(4,3,3) = 6, A(4,4,3) = 1, ...
In other words, A(n,k,3) is the matrix
1
1 1
1 3 1
-5 7 6 1
...
with all other entries in each row being 0. - _N. J. A. Sloane_, Dec 21 2019
		

Crossrefs

Formula

A(n,k,m) = A(n-1,k-1,m) - Sum_{i=1..m-1} (-1)^{i}(k)...(k+i-1) A(n,k+i,m) A(n,k,m) = A(n-1,k-1,m) + k A(n-1,k,m) + (-1)^m k(k+1)...(k+m-1)A(n,k+m,m).

A111246 Triangle read by rows: a(n,k) = number of partitions of an n-set into exactly k nonempty subsets, each of size <= 3.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 0, 7, 6, 1, 0, 10, 25, 10, 1, 0, 10, 75, 65, 15, 1, 0, 0, 175, 315, 140, 21, 1, 0, 0, 280, 1225, 980, 266, 28, 1, 0, 0, 280, 3780, 5565, 2520, 462, 36, 1, 0, 0, 0, 9100, 26145, 19425, 5670, 750, 45, 1, 0, 0, 0, 15400, 102025, 125895, 56595, 11550, 1155
Offset: 1

Author

Ji Young Choi, Oct 31 2005

Keywords

Comments

a(n,k) = 0 if k > n; a(n,k) = 0 if n > 0 and k < 0; a(n,k) can be extended to negative n and k, just as the Stirling numbers or Pascal's triangle can be extended. The present triangle is called the tri-restricted Stirling numbers of the second kind.
Also the Bell transform of the sequence "a(n) = 1 if n<3 else 0". For the definition of the Bell transform see A264428. - Peter Luschny, Jan 27 2016

Examples

			a(1,1)=1;
a(2,1)=1; a(2,2)=1;
a(3,1)=1; a(3,2)=3; a(3,3)=1;
a(4,1)=0; a(4,2)=7; a(4,3)=6; a(4,4)=1;
a(5,1)=0; a(5,2)=10; a(5,3)=25; a(5,4)=10; a(5,5)=1;
a(6,1)=0; a(6,2)=10; a(6,3)=75; a(6,4)=65; a(6,5)=15; a(6,6)=1; ...
		

References

  • J. Y. Choi and J. D. H. Smith, On the combinatorics of multi-restricted numbers, Ars. Com., 75(2005), pp. 44-63.

Crossrefs

A144385 and A144402 are other versions of this same triangle.
Cf. A001680, A008277 (Stirling numbers).

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0,...) as column 0.
    BellMatrix(n -> `if`(n<3,1,0), 10); # Peter Luschny, Jan 27 2016
  • Mathematica
    BellMatrix[f_Function, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    M = BellMatrix[If[# < 3, 1, 0]&, rows];
    Table[M[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 24 2018, after Peter Luschny *)
  • PARI
    row(n) = {x='x+O('x^(n+1)); polcoeff(serlaplace(exp(y*(x+x^2/2+x^3/6))), n, 'x); }
    tabl(nn) = for(n=1, nn, print(Vecrev(row(n)/y))) \\ Jinyuan Wang, Dec 21 2019

Formula

a(n, k) = a(n-1, k-1) + k*a(n-1, k) - binomial(n-1, 3)*a(n-4, k-1).
G.f. = Sum_{k_1+k_2+k_3=k, k_1+ 2k_2+3k_3=n} frac{n!}{(1!)^{k_1}(2!)^{k_2}(3!)^{k_3}k_1!k_2!k_3!}.
E.g.f.: exp(y*(x+x^2/2+x^3/6)). - Vladeta Jovovic, Nov 01 2005

Extensions

More terms from Vladeta Jovovic, Nov 01 2005
Recurrence, offset and example corrected by David Applegate, Jan 16 2009