login
a(n) is the number of integer sequences b(0..n) of length n+1, with 0 <= b(k) <= k! and monotonic b(k) <= b(k+1).
0

%I #65 Aug 06 2022 08:05:36

%S 2,3,7,40,856,91821,60080136,279276911843,10503211888973754,

%T 3585680755683196123365,12323227994417456429490342865,

%U 468378989392773003347310901356953089,214565221409985003242070442557341938941878313,1282499669290042152350268651085002913530161723080398635

%N a(n) is the number of integer sequences b(0..n) of length n+1, with 0 <= b(k) <= k! and monotonic b(k) <= b(k+1).

%C List of the possible cases regarding the patterns of the numbers in the sequence b:

%C Length: 1 2 3 4 5 6

%C Pos 0: 1 1 1 1 1 1

%C Pos 1: 1 2 3 4 5 6

%C Pos 2: 0 0 3 7 12 18

%C Pos 3: 0 0 0 7 19 37

%C Pos 4: 0 0 0 7 26 63

%C Pos 5: 0 0 0 7 33 96

%C Pos 6: 0 0 0 7 40 136

%C Pos 7: 0 0 0 0 40 176

%C Pos 8: 0 0 0 0 40 216

%C ... ... ... ... ... ... ...

%C Sum: 2 3 7 40 856 91821

%C Each row counts the number of possible distributions of numbers, row "Pos 0" is the number of possible distributions with only the number zero. The row "Pos 1" counts the distributions of zeros and ones. The row "Pos 2" the possible distributions of {0,1,2} and so forth.

%C From top to down: If a number in the column length = k has reached the value of the sum of the column length = k-1, this number will be k!-(k-1)!+1 times repeated. Before this limit is reached each number is the sum of the neighbor one step above and the neighbor one step to the left.

%F a(n) = binomial((n-1)! + n-1, n-1) + binomial((n-1)! + n-2, n-1) + Sum_{r = 1..n-2} Sum_{k = 0..r-1} binomial((n-1)! - r! - k+n - 2, n-1)*binomial(r-1,k)*a(r)*(-1)^(k+1).

%e For a(0) we get two possible sequences:

%e {0}, {1}.

%e For a(1) we get three possible sequences:

%e {0, 0}, {0, 1}, {1, 1}.

%e For a(2) = 7 we get:

%e {0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 1, 1},

%e {0, 1, 2}, {1, 1, 1}, {1, 1, 2}.

%o (PARI)

%o a(n) = binomial((n-1)! + n-1, n-1) + binomial((n-1)! + n-2, n-1) + sum(r = 1, n-2, sum(k = 0, r-1 ,binomial((n-1)! - r! - k+n - 2, n-1)*binomial(r-1,k)*a(r)*(-1)^(k+1)))

%Y Cf. A000108 (if we change the definition into 0 <= b(k) <= k).

%Y Cf. A005269, A005270, A008934, A016121, A128094, A242105.

%K nonn

%O 0,1

%A _Thomas Scheuerle_, Aug 04 2022