login
A172971
Triangle T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j), read by rows.
2
-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,13
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).
EXAMPLE
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;
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
PROG
(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
(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
CROSSREFS
Cf. A000009.
Sequence in context: A101124 A011127 A172970 * A306702 A240581 A329043
KEYWORD
sign,tabl,less
AUTHOR
Roger L. Bagula, Feb 06 2010
EXTENSIONS
Edited by G. C. Greubel, Dec 04 2022
STATUS
approved