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.

A261838 Number of compositions of n into distinct parts where each part i is marked with a word of length i over a k-ary alphabet (k=1,2,3,...) whose letters appear in alphabetical order and all k letters occur at least once in the composition.

This page as a plain text file.
%I A261838 #14 Feb 25 2017 03:00:22
%S A261838 1,1,2,20,48,264,4296,14528,89472,593248,19115360,75604544,599169408,
%T A261838 4141674240,40147321344,2159264715776,10240251475456,92926573965184,
%U A261838 746025520714112,7285397378650112,82900557619046912,7796186873306241024,41825012467664893440
%N A261838 Number of compositions of n into distinct parts where each part i is marked with a word of length i over a k-ary alphabet (k=1,2,3,...) whose letters appear in alphabetical order and all k letters occur at least once in the composition.
%C A261838 Also number of matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n and the column sums are distinct.
%C A261838 a(2) = 2:
%C A261838 [1]   [2]
%C A261838 [1]
%H A261838 Alois P. Heinz, <a href="/A261838/b261838.txt">Table of n, a(n) for n = 0..300</a>
%e A261838 a(0) = 1: the empty composition.
%e A261838 a(1) = 1: 1a.
%e A261838 a(2) = 2: 2aa (for k=1), 2ab (for k=2).
%p A261838 b:= proc(n, i, p, k) option remember;
%p A261838       `if`(i*(i+1)/2<n, 0, `if`(n=0, p!, b(n, i-1, p, k)+
%p A261838       `if`(i>n, 0, b(n-i, i-1, p+1, k)*binomial(i+k-1, k-1))))
%p A261838     end:
%p A261838 a:= n-> add(add(b(n$2, 0, k-i)*(-1)^i*binomial(k, i), i=0..k), k=0..n):
%p A261838 seq(a(n), n=0..25);
%t A261838 b[n_, i_, p_, k_] := b[n, i, p, k] = If[i*(i+1)/2 < n, 0, If[n == 0, p!, b[n, i-1, p, k] + If[i>n, 0, b[n-i, i-1, p+1, k]*Binomial[i+k-1, k-1]]]]; a[n_] := Sum[b[n, n, 0, k-i]*(-1)^i*Binomial[k, i], {k, 0, n}, {i, 0, k}]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Feb 25 2017, translated from Maple *)
%Y A261838 Row sums of A261836.
%Y A261838 Cf. A120733.
%K A261838 nonn
%O A261838 0,3
%A A261838 _Alois P. Heinz_, Sep 02 2015