A329146 Triangle read by rows: T(n,k) is the number of subsets of {1,...,n} such that the difference between any two elements is k or greater, 1 <= k <= n.
2, 4, 3, 8, 5, 4, 16, 8, 6, 5, 32, 13, 9, 7, 6, 64, 21, 13, 10, 8, 7, 128, 34, 19, 14, 11, 9, 8, 256, 55, 28, 19, 15, 12, 10, 9, 512, 89, 41, 26, 20, 16, 13, 11, 10, 1024, 144, 60, 36, 26, 21, 17, 14, 12, 11, 2048, 233, 88, 50, 34, 27, 22, 18, 15, 13, 12, 4096, 377, 129
Offset: 1
Examples
a(1) = T(1,1) = |{}, {1}| = 2 a(2) = T(2,1) = |{}, {1}, {2}, {1,2}| = 4 a(3) = T(2,2) = |{}, {1}, {2}| = 3 a(4) = T(3,1) = |{}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}| = 8 a(5) = T(3,2) = |{}, {1}, {2}, {3}, {1,3}| = 5 etc. The triangle begins: 2; 4, 3; 8, 5, 4; 16, 8, 6, 5; 32, 13, 9, 7, 6; ...
Links
- Gerhard Kirchner, First 141 rows of T(n,k): Table of n, a(n) for n = 1..10011
Crossrefs
Programs
-
PARI
T(n,k) = sum(j=0, ceil(n/k), binomial(n-(k-1)*(j-1), j)); \\ Andrew Howroyd, Nov 06 2019
Formula
Let g(n,k,j) be the number of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Then
(1) T(n,k) = Sum_{j = 0..n} g(n,k,j)
(2) g(n,k,j) = binomial(n-(k-1)*(j-1),j) with the convention binomial(m,j)=0 for j > m
(3) T(n,k) = T(n-1,k) + T(n-k,k), n >= 2*k
or: T(n,k) = n+1 for n <= k and T(n,k) = T(n-1,k) + T(n-k,k) for n > k (see comments).
Formula(1) is evident.
Proof of formula(2):
Let C(n,k,j) be the class of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Let S be one of these subsets and let us write it as a j-tuple (c(1),..,c(j)) with c(i+1)-c(i)>=k, 1<=i
In particular, the number of subsets of C(m,1,j) is binomial(m,j), the basic tuple is (1,...,j) and the generating tuple is (d(1),...,d(j)) with 0 <= d(1) <= ... <= d(j) <= m-j.
With m-j = n-(j-1)*k-1, i.e., m = n-(j-1)*(k-1), the numbers of subsets in C(n,k,j) and C(m,1,j) are equal: g(n,k,j) = binomial(n-(k-1)*(j-1),j) qed
Proof of formula(3):
Using the binomial recurrence binomial(m,j) = binomial(m-1,j) + binomial(m-1,j-1) for m = n-(j-1)*(k-1), we find:
T(n,k) = Sum_{j = 0..n} binomial(n-(k-1)*(j-1),j)
= Sum_{j = 0..n-1} binomial(n-1-(k-1)*(j-1),j)
+ Sum_{j = 1..n} binomial(n-1-(k-1)*(j-1),j-1)
= T(n-1,k) + Sum_{j = 0..n-1} binomial(n-1-(k-1)*j,j)
= T(n-1,k) + Sum_{j = 0..n-k} binomial(n-k-(k-1)*(j-1),j)
= T(n-1,k) + T(n-k,k) qed
T(n-k,k) must be known in this recurrence, therefore n >= 2*k.
For k <= n < 2*k, formula(1) must be applied.
A373706 Expansion of 1/(1 - x * (1 + x^4)^2).
1, 1, 1, 1, 1, 3, 5, 7, 9, 12, 19, 30, 45, 64, 91, 134, 201, 300, 440, 641, 939, 1386, 2050, 3021, 4437, 6516, 9588, 14128, 20811, 30624, 45042, 66268, 97545, 143604, 211368, 311040, 457704, 673605, 991437, 1459215, 2147563, 3160516, 4651330, 6845572, 10075042
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,2,0,0,0,1).
Programs
-
PARI
a(n) = sum(k=0, 2*n\9, binomial(2*n-8*k, k));
Formula
a(n) = a(n-1) + 2*a(n-5) + a(n-9) for n > 8.
a(n) = Sum_{k=0..floor(2*n/9)} binomial(2*n-8*k,k).
a(n) = A005711(2*n-1) for n > 0.
Comments