This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A382342 #22 Apr 19 2025 03:53:53 %S A382342 1,0,2,0,2,3,0,2,4,4,0,2,7,6,5,0,2,8,12,8,6,0,2,11,18,17,10,7,0,2,12, %T A382342 26,28,22,12,8,0,2,15,34,46,38,27,14,9,0,2,16,46,64,66,48,32,16,10,0, %U A382342 2,19,56,94,100,86,58,37,18,11,0,2,20,70,124,152,136,106,68,42,20,12 %N A382342 Triangle read by rows: T(n, k) is the number of partitions of n into k parts where 0 <= k <= n, and each part is one of two kinds. %H A382342 Alois P. Heinz, <a href="/A382342/b382342.txt">Rows n = 0..200, flattened</a> %F A382342 T(n,n) = n + 1. %F A382342 T(n,1) = 2 for n >= 1. %F A382342 T(n,k) = A381895(n,k) - A381895(n,k-1) for 1 <= k <= n. %F A382342 Sum_{k=0..n} (-1)^k * T(n,k) = A022597(n). - _Alois P. Heinz_, Mar 27 2025 %e A382342 Triangle starts: %e A382342 0 : [1] %e A382342 1 : [0, 2] %e A382342 2 : [0, 2, 3] %e A382342 3 : [0, 2, 4, 4] %e A382342 4 : [0, 2, 7, 6, 5] %e A382342 5 : [0, 2, 8, 12, 8, 6] %e A382342 6 : [0, 2, 11, 18, 17, 10, 7] %e A382342 7 : [0, 2, 12, 26, 28, 22, 12, 8] %e A382342 8 : [0, 2, 15, 34, 46, 38, 27, 14, 9] %e A382342 9 : [0, 2, 16, 46, 64, 66, 48, 32, 16, 10] %e A382342 10 : [0, 2, 19, 56, 94, 100, 86, 58, 37, 18, 11] %e A382342 ... %p A382342 b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0, %p A382342 add(x^j*b(n-i*j, min(n-i*j, i-1))*(j+1), j=0..n/i)))) %p A382342 end: %p A382342 T:= (n, k)-> coeff(b(n$2), x, k): %p A382342 seq(seq(T(n, k), k=0..n), n=0..11); # _Alois P. Heinz_, Mar 27 2025 %t A382342 b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[x^j*b[n - i*j, Min[n - i*j, i - 1]]*(j + 1), {j, 0, n/i}]]]]; %t A382342 T[n_, k_] := Coefficient[b[n, n], x, k]; %t A382342 Table[Table[T[n, k], {k, 0, n}], {n, 0, 11}] // Flatten (* _Jean-François Alcover_, Apr 19 2025, after _Alois P. Heinz_ *) %o A382342 (Python) %o A382342 from sympy.utilities.iterables import partitions %o A382342 def t_row( n): %o A382342 if n == 0 : return [1] %o A382342 t = list( [0] * n) %o A382342 for p in partitions( n): %o A382342 fact = 1 %o A382342 s = 0 %o A382342 for k in p : %o A382342 s += p[k] %o A382342 fact *= 1 + p[k] %o A382342 if s > 0 : %o A382342 t[s - 1] += fact %o A382342 return [0] + t %Y A382342 Row sums give A000712. %Y A382342 Cf. A008284 (1-kind case), A022597, A381895, A382345. %K A382342 nonn,tabl %O A382342 0,3 %A A382342 _Peter Dolland_, Mar 27 2025