Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Dec 05 2022 04:41:49
%S -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,
%T 35,-1,-1,191,227,234,234,227,191,-1,-1,1199,1391,1426,1432,1426,1391,
%U 1199,-1,-1,10079,11279,11470,11504,11504,11470,11279,10079,-1
%N Triangle T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j), read by rows.
%H G. C. Greubel, <a href="/A172971/b172971.txt">Rows n = 0..50 of the triangle, flattened</a>
%F T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j).
%F T(n, n-k) = T(n, k).
%e Triangle begins as:
%e -1;
%e -1, -1;
%e -1, -1, -1;
%e -1, 0, 0, -1;
%e -1, 1, 2, 1, -1;
%e -1, 7, 9, 9, 7, -1;
%e -1, 35, 43, 44, 43, 35, -1;
%e -1, 191, 227, 234, 234, 227, 191, -1;
%e -1, 1199, 1391, 1426, 1432, 1426, 1391, 1199, -1;
%e -1, 10079, 11279, 11470, 11504, 11504, 11470, 11279, 10079, -1;
%t c[n_]:= Product[PartitionsQ[j], {j,n}];
%t T[n_, k_]:= c[n] - (c[k] + c[n-k]);
%t Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
%o (Magma)
%o A000009:= Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller's code
%o c:= func< n | (&*[A000009[j+1]: j in [0..n]]) >;
%o A172971:= func< n,k | c(n) - c(k) - c(n-k) >;
%o [A172971(n,k): k in [0..n], n in [0..15]]; // _G. C. Greubel_, Dec 04 2022
%o (SageMath)
%o def EulerTransform(a):
%o @cached_function
%o def b(n):
%o if n == 0: return 1
%o s = sum(sum(d * a(d) for d in divisors(j)) * b(n-j) for j in (1..n))
%o return s//n
%o return b
%o a = BinaryRecurrenceSequence(0, 1)
%o b = EulerTransform(a) # Peter Luschny's code for A000009
%o @CachedFunction
%o def c(n): return product(b(j) for j in range(n+1))
%o def A172971(n,k): return c(n) - c(k) - c(n-k)
%o flatten([[A172971(n,k) for k in range(n+1)] for n in range(12)]) # _G. C. Greubel_, Dec 04 2022
%Y Cf. A000009.
%K sign,tabl,less
%O 0,13
%A _Roger L. Bagula_, Feb 06 2010
%E Edited by _G. C. Greubel_, Dec 04 2022