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.

A091438 Triangle a(n,k) of partitions of n objects of 2 colors, k of which are black and each part with at least one black object.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 3, 4, 5, 1, 3, 6, 7, 7, 1, 4, 8, 12, 12, 11, 1, 4, 10, 16, 21, 19, 15, 1, 5, 12, 23, 31, 36, 30, 22, 1, 5, 15, 28, 45, 55, 58, 45, 30, 1, 6, 17, 37, 60, 84, 94, 92, 67, 42, 1, 6, 20, 44, 80, 115, 147, 153, 140, 97, 56, 1, 7, 23, 55, 101, 161, 211, 249, 244, 211, 139, 77
Offset: 1

Views

Author

Keywords

Comments

Number of ways to factor p^(n-k)*q^k where p and q are distinct primes and each factor is a multiple of q.

Examples

			  1;
  1, 2;
  1, 2, 3;
  1, 3, 4, 5;
  1, 3, 6, 7, 7; ...
		

Crossrefs

Row sums: A000219.
Main diagonal: A000041.
a(2n,n) gives A108457.
Cf. A054225.

Programs

  • Maple
    b:= proc(n, i, j, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(i<1 or k<1, 0, `if`(j<1, b(n, i-1, i-1, k),
           b(n, i, j-1, k)+`if`(i>n or j>k, 0, b(n-i, i, j, k-j)))))
        end:
    a:= (n, k)->  b(n$2, k$2):
    seq(seq(a(n,k), k=1..n), n=1..15);  # Alois P. Heinz, Mar 14 2015
  • Mathematica
    b[n_, i_, j_, k_] := b[n, i, j, k] = If[n == 0, If[k == 0, 1, 0], If[i < 1 || k < 1, 0, If[j < 1, b[n, i - 1, i - 1, k], b[n, i, j - 1, k] + If[i > n || j > k, 0, b[n - i, i, j, k - j]]]]]; a[n_, k_] :=  b[n, n, k, k]; Table[a[n, k], {n, 1, 15}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 10 2016, after Alois P. Heinz *)

Formula

G.f.: A(x,y) = Product_{i>=1, j=1..i} (1/(1-x^i*y^j)).