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 A382025 #5 Mar 19 2025 10:39:45 %S A382025 1,0,3,0,3,9,0,3,12,22,0,3,18,36,51,0,3,21,57,87,108,0,3,27,82,148, %T A382025 193,221,0,3,30,111,225,330,393,429,0,3,36,144,333,528,681,765,810,0, %U A382025 3,39,184,460,808,1106,1316,1424,1479,0,3,45,225,630,1182,1740,2163,2439,2574,2640 %N A382025 Triangle read by rows: T(n, k) is the number of partitions of n with at most k parts where 0 <= k <= n, and each part is one of three kinds. %C A382025 The 1-kind case is Euler's table A026820. %C A382025 The 2-kind case is A381895. %e A382025 Triangle starts: %e A382025 0 : [1] %e A382025 1 : [0, 3] %e A382025 2 : [0, 3, 9] %e A382025 3 : [0, 3, 12, 22] %e A382025 4 : [0, 3, 18, 36, 51] %e A382025 5 : [0, 3, 21, 57, 87, 108] %e A382025 6 : [0, 3, 27, 82, 148, 193, 221] %e A382025 7 : [0, 3, 30, 111, 225, 330, 393, 429] %e A382025 8 : [0, 3, 36, 144, 333, 528, 681, 765, 810] %e A382025 9 : [0, 3, 39, 184, 460, 808, 1106, 1316, 1424, 1479] %e A382025 10 : [0, 3, 45, 225, 630, 1182, 1740, 2163, 2439, 2574, 2640] %e A382025 ... %o A382025 (Python) %o A382025 from sympy import binomial %o A382025 from sympy.utilities.iterables import partitions %o A382025 from sympy.combinatorics.partitions import IntegerPartition %o A382025 kinds = 3 - 1 # the number of part kinds - 1 %o A382025 def a382025_row( n): %o A382025 if n == 0 : return [1] %o A382025 t = list( [0] * n) %o A382025 for p in partitions( n): %o A382025 p = IntegerPartition( p).as_dict() %o A382025 fact = 1 %o A382025 s = 0 %o A382025 for k in p : %o A382025 s += p[k] %o A382025 fact *= binomial( kinds + p[k], kinds) %o A382025 if s > 0 : %o A382025 t[s - 1] += fact %o A382025 for i in range( n - 1): %o A382025 t[i+1] += t[i] %o A382025 return [0] + t %Y A382025 Main diagonal gives A000716. %Y A382025 Cf. A026820, A381895. %K A382025 nonn,tabl %O A382025 0,3 %A A382025 _Peter Dolland_, Mar 12 2025