|
|
A331332
|
|
Sparse ruler statistics: T(n,k) (0 <= k <= n) is the number of rulers with length n where the length of the first segment appears k times. Triangle read by rows.
|
|
3
|
|
|
1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 4, 3, 0, 1, 0, 8, 4, 3, 0, 1, 0, 14, 9, 4, 4, 0, 1, 0, 26, 16, 12, 4, 5, 0, 1, 0, 46, 34, 21, 15, 5, 6, 0, 1, 0, 85, 64, 45, 28, 20, 6, 7, 0, 1, 0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1, 0, 286, 236, 183, 128, 90, 48, 35, 8, 9, 0, 1, 0, 528, 452, 361, 269, 185, 126, 63, 44, 9, 10, 0, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
COMMENTS
|
A sparse ruler, or simply a ruler, is a strict increasing finite sequence of nonnegative integers starting from 0 called marks. See A103294 for more definitions.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
Triangle starts:
[ 0][1]
[ 1][0, 1]
[ 2][0, 1, 1]
[ 3][0, 3, 0, 1]
[ 4][0, 4, 3, 0, 1]
[ 5][0, 8, 4, 3, 0, 1]
[ 6][0, 14, 9, 4, 4, 0, 1]
[ 7][0, 26, 16, 12, 4, 5, 0, 1]
[ 8][0, 46, 34, 21, 15, 5, 6, 0, 1]
[ 9][0, 85, 64, 45, 28, 20, 6, 7, 0, 1]
[10][0, 155, 124, 90, 64, 36, 27, 7, 8, 0, 1]
|
|
MAPLE
|
b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
`if`(i=j, x, 1)*b(n-j, `if`(n<i+j, 0, i))), j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(
`if`(n=0, 1, add(b(n-j, j), j=1..n))):
|
|
MATHEMATICA
|
b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, Sum[b[n - j, j], {j, 1, n}]]];
|
|
PROG
|
(SageMath)
if n == 0: return [1]
L = [0 for k in (0..n)]
for c in Compositions(n):
L[list(c).count(c[0])] += 1
return L
for n in (0..10): print(A331332_row(n))
|
|
CROSSREFS
|
Row sums over even columns give A331609 (for n>0).
Row sums over odd columns give A331606 (for n>0).
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|