A172971 Triangle T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j), read by rows.
-1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, 1, 2, 1, -1, -1, 7, 9, 9, 7, -1, -1, 35, 43, 44, 43, 35, -1, -1, 191, 227, 234, 234, 227, 191, -1, -1, 1199, 1391, 1426, 1432, 1426, 1391, 1199, -1, -1, 10079, 11279, 11470, 11504, 11504, 11470, 11279, 10079, -1
Offset: 0
Examples
Triangle begins as: -1; -1, -1; -1, -1, -1; -1, 0, 0, -1; -1, 1, 2, 1, -1; -1, 7, 9, 9, 7, -1; -1, 35, 43, 44, 43, 35, -1; -1, 191, 227, 234, 234, 227, 191, -1; -1, 1199, 1391, 1426, 1432, 1426, 1391, 1199, -1; -1, 10079, 11279, 11470, 11504, 11504, 11470, 11279, 10079, -1;
Links
- G. C. Greubel, Rows n = 0..50 of the triangle, flattened
Crossrefs
Cf. A000009.
Programs
-
Magma
A000009:= Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller's code c:= func< n | (&*[A000009[j+1]: j in [0..n]]) >; A172971:= func< n,k | c(n) - c(k) - c(n-k) >; [A172971(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 04 2022
-
Mathematica
c[n_]:= Product[PartitionsQ[j], {j,n}]; T[n_, k_]:= c[n] - (c[k] + c[n-k]); Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
-
SageMath
def EulerTransform(a): @cached_function def b(n): if n == 0: return 1 s = sum(sum(d * a(d) for d in divisors(j)) * b(n-j) for j in (1..n)) return s//n return b a = BinaryRecurrenceSequence(0, 1) b = EulerTransform(a) # Peter Luschny's code for A000009 @CachedFunction def c(n): return product(b(j) for j in range(n+1)) def A172971(n,k): return c(n) - c(k) - c(n-k) flatten([[A172971(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Dec 04 2022
Formula
T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j).
T(n, n-k) = T(n, k).
Extensions
Edited by G. C. Greubel, Dec 04 2022