A320552
Number of partitions of n into parts of exactly ten sorts which are introduced in ascending order such that sorts of adjacent parts are different.
Original entry on oeis.org
1, 46, 1202, 23523, 384227, 5542879, 73055550, 899381476, 10501235760, 117575627562, 1272685923725, 13401470756234, 137945728220808, 1393299928219652, 13851195993229478, 135865787060384468, 1317624915100586227, 12654868264707472392, 120534359759023933905
Offset: 10
-
b:= proc(n, i, k) option remember; `if`(n=0 or i=1, k^(n-1),
b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k)))
end:
A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, k*b(n$2, k-1))):
a:= n-> (k-> add(A(n, k-i)*(-1)^i/(i!*(k-i)!), i=0..k))(10):
seq(a(n), n=10..40);
A262444
Number of 3-colored integer partitions such that no adjacent parts have the same color.
Original entry on oeis.org
1, 3, 9, 21, 51, 111, 249, 525, 1119, 2319, 4809, 9825, 20079, 40671, 82341, 165945, 334191, 671307, 1347861, 2702385, 5416395, 10847787, 21720981, 43474869, 87004875, 174081051, 348279777, 696712749, 1393674603, 2787673767, 5575871457, 11152425093, 22305942039
Offset: 0
a(2) = 9 because there are two integer partitions of 2: [2], [1,1] and there are three ways to color [2] and 3 X 2 = 6 ways to color [1,1].
-
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1) +`if`(i>n, 0, 2*b(n-i, i))))
end:
a:= n-> floor(b(n$2)/2*3):
seq(a(n), n=0..50); # Alois P. Heinz, Sep 23 2015
-
Rest[CoefficientList[Series[3/2 Product[1/(1 - 2 x^k), {k, 1, 35}], {x, 0, 35}], x]] (* Vincenzo Librandi, Sep 23 2015 *)
A262529
Number of partitions of 2n into parts of exactly n sorts which are introduced in ascending order such that sorts of adjacent parts are different.
Original entry on oeis.org
1, 1, 4, 31, 464, 10423, 307123, 11087757, 471750268, 23064505722, 1272685923725, 78185947269685, 5290601944971906, 390900941750607195, 31309282176759170370, 2701913799542547998709, 249913023732255442857064, 24663493072687443375499678
Offset: 0
a(2) = 4: 3a1b, 2a2b, 2a1b1a, 1a1b1a1b.
-
b:= proc(n, i, k) option remember; `if`(n=0 or i=1, k^(n-1),
b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k)))
end:
A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, k*b(n$2, k-1))):
a:= n-> add(A(2*n, n-i)*(-1)^i/(i!*(n-i)!), i=0..n):
seq(a(n), n=0..20);
-
b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i == 1, k^(n-1), b[n, i-1, k] + If[i>n, 0, k*b[n-i, i, k]]]; A[n_, k_] := If[n == 0, 1, If[k<2, k, k*b[n, n, k-1]]]; a[n_] := Sum[A[2*n, n-i]*(-1)^i/(i!*(n-i)!), {i, 0, n}]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 07 2017, translated from Maple *)