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.
A193942 G.f.: (1+x^4)/(1-x-x^8).
1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 5, 6, 8, 10, 12, 14, 17, 21, 26, 32, 40, 50, 62, 76, 93, 114, 140, 172, 212, 262, 324, 400, 493, 607, 747, 919, 1131, 1393, 1717, 2117, 2610, 3217, 3964, 4883, 6014, 7407, 9124, 11241, 13851, 17068, 21032, 25915, 31929, 39336
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1).
Crossrefs
Cf. A005710.
Programs
-
Maple
A193942 := proc(n): coeftayl((1+x^4)/(1-x-x^8),x=0,n) end: seq(A193942(n), n=0..53);
-
PARI
Vec((1+x^4)/(1-x-x^8) + O(x^50)) \\ Jinyuan Wang, Apr 01 2020
A242763 a(n) = 1 for n <= 7; a(n) = a(n-5) + a(n-7) for n>7.
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 7, 7, 8, 9, 9, 12, 12, 15, 16, 17, 21, 21, 27, 28, 32, 37, 38, 48, 49, 59, 65, 70, 85, 87, 107, 114, 129, 150, 157, 192, 201, 236, 264, 286, 342, 358, 428, 465, 522, 606, 644, 770, 823, 950, 1071, 1166, 1376
Offset: 1
Comments
Generalized Fibonacci growth sequence using i = 2 as maturity period, j = 5 as conception period, and k = 2 as growth factor.
Maturity period is the number of periods that a Fibonacci tree node needs for being able to start developing branches. Conception period is the number of periods in a Fibonacci tree node needed to develop new branches since its maturity. Growth factor is the number of additional branches developed by a Fibonacci tree node, plus 1, and equals the base of the exponential series related to the given tree if maturity factor would be zero. Standard Fibonacci would use 1 as maturity period, 1 as conception period, and 2 as growth factor as the series becomes equal to 2^n with a maturity period of 0. Related to Lucas sequences.
Examples
For n = 13 the a(13) = a(8) + a(6) = 2 + 1 = 3.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Julia Collins, Fibonacci Tree
- Fractal Foundation, Fibonacci Fractals
- D. H. Lehmer, An extended theory of Lucas' functions, Annals of Mathematics, Second Series, Vol. 31, No. 3 (Jul., 1930), pp. 419-448.
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1,0,1).
Crossrefs
Cf. A000079 (i = 0, j = 1, k = 2), A000244 (i = 0, j = 1, k = 3), A000302 (i = 0, j = 1, k = 4), A000351 (i = 0, j = 1, k = 5), A000400 (i = 0, j = 1, k = 6), A000420 (i = 0, j = 1, k = 7), A001018 (i = 0, j = 1, k = 8), A001019 (i = 0, j = 1, k = 9), A011557 (i = 0, j = 1, k = 10), A001020 (i = 0, j = 1, k = 11), A001021 (i = 0, j = 1, k = 12), A016116 (i = 0, j = 2, k = 2), A108411 (i = 0, j = 2, k = 3), A213173 (i = 0, j = 2, k = 4), A074872 (i = 0, j = 2, k = 5), A173862 (i = 0, j = 3, k = 2), A127975 (i = 0, j = 3, k = 3), A200675 (i = 0, j = 4, k = 2), A111575 (i = 0, j = 4, k = 3), A000045 (i = 1, j = 1, k = 2), A001045 (i = 1, j = 1, k = 3), A006130 (i = 1, j = 1, k = 4), A006131 (i = 1, j = 1, k = 5), A015440 (i = 1, j = 1, k = 6), A015441 (i = 1, j = 1, k = 7), A015442 (i = 1, j = 1, k = 8), A015443 (i = 1, j = 1, k = 9), A015445 (i = 1, j = 1, k = 10), A015446 (i = 1, j = 1, k = 11), A015447 (i = 1, j = 1, k = 12), A000931 (i = 1, j = 2, k = 2), A159284 (i = 1, j = 2, k = 3), A238389 (i = 1, j = 2, k = 4), A097041 (i = 1, j = 2, k = 10), A079398 (i = 1, j = 3, k = 2), A103372 (i = 1, j = 4, k = 2), A103373 (i = 1, j = 5, k = 2), A103374 (i = 1, j = 6, k = 2), A000930 (i = 2, j = 1, k = 2), A077949 (i = 2, j = 1, k = 3), A084386 (i = 2, j = 1, k = 4), A089977 (i = 2, j = 1, k = 5), A178205 (i = 2, j = 1, k = 11), A103609 (i = 2, j = 2, k = 2), A077953 (i = 2, j = 2, k = 3), A226503 (i = 2, j = 3, k = 2), A122521 (i = 2, j = 6, k = 2), A003269 (i = 3, j = 1, k = 2), A052942 (i = 3, j = 1, k = 3), A005686 (i = 3, j = 2, k = 2), A237714 (i = 3, j = 2, k = 3), A238391 (i = 3, j = 2, k = 4), A247049 (i = 3, j = 3, k = 2), A077886 (i = 3, j = 3, k = 3), A003520 (i = 4, j = 1, k = 2), A108104 (i = 4, j = 2, k = 2), A005708 (i = 5, j = 1, k = 2), A237716 (i = 5, j = 2, k = 3), A005709 (i = 6, j = 1, k = 2), A122522 (i = 6, j = 2, k = 2), A005710 (i = 7, j = 1, k = 2), A237718 (i = 7, j = 2, k = 3), A017903 (i = 8, j = 1, k = 2).
Programs
-
Magma
[n le 7 select 1 else Self(n-5)+Self(n-7): n in [1..70]]; // Vincenzo Librandi, Nov 30 2016
-
Mathematica
LinearRecurrence[{0, 0, 0, 0, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1}, 70] (* or *) CoefficientList[ Series[(1+x+x^2+x^3+x^4)/(1-x^5-x^7), {x, 0, 70}], x] (* Robert G. Wilson v, Nov 25 2016 *) nxt[{a_,b_,c_,d_,e_,f_,g_}]:={b,c,d,e,f,g,a+c}; NestList[nxt,{1,1,1,1,1,1,1},70][[;;,1]] (* Harvey P. Dale, Oct 22 2024 *)
-
PARI
Vec(x*(1+x+x^2+x^3+x^4)/((1-x+x^2)*(1+x-x^3-x^4-x^5)) + O(x^100)) \\ Colin Barker, Oct 27 2016
-
SageMath
@CachedFunction # a = A242763 def a(n): return 1 if n<8 else a(n-5) +a(n-7) [a(n) for n in range(1,76)] # G. C. Greubel, Oct 23 2024
Formula
Generic a(n) = 1 for n <= i+j; a(n) = a(n-j) + (k-1)*a(n-(i+j)) for n>i+j where i = maturity period, j = conception period, k = growth factor.
G.f.: x*(1+x+x^2+x^3+x^4) / ((1-x+x^2)*(1+x-x^3-x^4-x^5)). - Colin Barker, Oct 09 2016
Generic g.f.: x*(Sum_{l=0..j-1} x^l) / (1-x^j-(k-1)*x^(i+j)), with i > 0, j > 0 and k > 1.
A247489 Square array read by antidiagonals: A(k, n) = hypergeometric(P, Q, -k^k/(k-1)^(k-1)) rounded to the nearest integer, P = [(j-n)/k, j=0..k-1] and Q = [(j-n)/(k-1), j=0..k-2], k>=1, n>=0.
1, 0, 2, 0, 1, 4, 0, 1, 2, 8, 0, 1, 1, 3, 16, 0, 1, 1, 2, 5, 32, 0, 1, 1, 1, 3, 8, 64, 0, 0, 1, 1, 2, 4, 13, 128, 0, 0, 1, 1, 1, 3, 6, 21, 256, 0, 0, 1, 1, 1, 2, 4, 9, 34, 512, 0, 0, 1, 1, 1, 1, 3, 5, 13, 55, 1024, 0, 0, 1, 1, 1, 1, 2, 4, 7, 19, 89, 2048
Offset: 0
Comments
Conjecture: hypergeometric(P, Q, -k^k/(k-1)^(k-1)) = sum_{j=0.. floor(n/k)} binomial(n-(k-1)*j, j) for n>=(k-1)^2, P and Q as above. (This means for n>=(k-1)^2 the representation is exact without rounding.)
Examples
First few rows of the square array: [k\n] if conjecture true [1], 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... A000079 n>=0 [2], 0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... 'A000045' n>=1 [3], 0, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, ... A000930 n>=4 [4], 0, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, ... A003269 n>=9 [5], 0, 1, 1, 1, 1, 2, 3, 4, 5, 6, 9, 11, 15, ... A003520 n>=16 [6], 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 6, 7, 10, ... A005708 n>=25 [7], 0, 0, 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 8, ... A005709 n>=36 [8], 0, 0, 1, 1, 1, 1, 2, 1, 2, 3, 3, 4, 5, 6, ... A005710 n>=49 'A000045' means that the Fibonacci numbers as referenced here start 1, 1, 2, 3, ... for n>=0.
Programs
-
Maple
A247489 := proc(k, n) seq((j-n)/k, j=0..k-1); seq((j-n)/(k-1), j=0..k-2); hypergeom([%%], [%], -k^k/(k-1)^(k-1)); round(evalf(%,100)) end: # Adjust precision if necessary! for k from 1 to 9 do print(seq(A247489(k, n), n=0..16)) od;
-
Sage
def A247489(k, n): P = [(j-n)/k for j in range(k)] Q = [(j-n)/(k-1) for j in range(k-1)] H = hypergeometric(P, Q, -k^k/(k-1)^(k-1)) return round(H.n(100)) # Adjust precision if necessary!
A373890 Number of compositions of 8*n into parts 1 and 8.
1, 2, 11, 64, 345, 1824, 9661, 51284, 272333, 1445995, 7677250, 40760798, 216412235, 1149004281, 6100444144, 32389272248, 171965334801, 913020717480, 4847528344990, 25737127996244, 136646907481155, 725503534206186, 3851937726561990, 20451208781128462
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (9,-28,56,-70,56,-28,8,-1).
Programs
-
PARI
a(n) = sum(k=0, n, binomial(n+7*k, n-k));
Formula
a(n) = A005710(8*n).
a(n) = Sum_{k=0..n} binomial(n+7*k,n-k).
a(n) = 9*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8).
G.f.: 1/(1 - x - x/(1 - x)^7).
Comments