A382339
Triangle read by rows: T(n,k) is the number of partitions of a 2-colored set of n objects into exactly k parts with 0 <= k <= n.
Original entry on oeis.org
1, 0, 2, 0, 3, 3, 0, 4, 6, 4, 0, 5, 14, 9, 5, 0, 6, 22, 24, 12, 6, 0, 7, 37, 49, 34, 15, 7, 0, 8, 52, 92, 76, 44, 18, 8, 0, 9, 76, 157, 162, 103, 54, 21, 9, 0, 10, 100, 260, 302, 232, 130, 64, 24, 10, 0, 11, 135, 400, 554, 468, 302, 157, 74, 27, 11
Offset: 0
Triangle begins:
0 : [1]
1 : [0, 2]
2 : [0, 3, 3]
3 : [0, 4, 6, 4]
4 : [0, 5, 14, 9, 5]
5 : [0, 6, 22, 24, 12, 6]
6 : [0, 7, 37, 49, 34, 15, 7]
7 : [0, 8, 52, 92, 76, 44, 18, 8]
8 : [0, 9, 76, 157, 162, 103, 54, 21, 9]
9 : [0, 10, 100, 260, 302, 232, 130, 64, 24, 10]
10 : [0, 11, 135, 400, 554, 468, 302, 157, 74, 27, 11]
...
-
b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, (n+1)*x^n,
add(b(n-i*j, min(n-i*j, i-1))*binomial(i+j, j)*x^j, j=0..n/i)))
end:
T:= (n, k)-> coeff(b(n$2), x, k):
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Mar 22 2025
-
b[n_, i_] := b[n, i] = Expand[If[n == 0 || i == 1, (n + 1)*x^n, Sum[b[n - i*j, Min[n - i*j, i - 1]]*Binomial[i + j, j]*x^j, {j, 0, n/i}]]];
T[n_, k_] := Coefficient[b[n, n], x, k];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 17 2025, after Alois P. Heinz *)
-
from sympy import binomial
from sympy.utilities.iterables import partitions
def t_row( n):
if n == 0 : return [1]
t = list( [0] * n)
for p in partitions( n):
fact = 1
s = 0
for k in p :
s += p[k]
fact *= binomial( k + p[k], p[k])
if s > 0 :
t[s - 1] += fact
return [0] + t
A353065
Euler transform of odd primes.
Original entry on oeis.org
1, 3, 11, 32, 92, 239, 608, 1465, 3450, 7858, 17525, 38165, 81653, 171497, 354785, 723084, 1454642, 2889854, 5676607, 11031046, 21224439, 40453596, 76428636, 143192339, 266172016, 491072611, 899583306, 1636775949, 2958900040, 5316004485, 9494514599
Offset: 0
-
a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
d*ithprime(d+1), d=numtheory[divisors](j)), j=1..n)/n)
end:
seq(a(n), n=0..30); # Alois P. Heinz, Apr 21 2022
-
nmax = 30; CoefficientList[Series[Product[1/(1 - x^k)^Prime[k + 1], {k, 1, nmax}], {x, 0, nmax}], x]
a[0] = 1; a[n_] := a[n] = (1/n) Sum[Sum[d Prime[d + 1], {d, Divisors[k]}] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 30}]
A060285
Number of partitions of n objects of 2 colors with parts size >1.
Original entry on oeis.org
1, 0, 3, 4, 11, 18, 42, 70, 144, 248, 466, 802, 1442, 2444, 4247, 7116, 12030, 19878, 32938, 53670, 87429, 140680, 225815, 359100, 569157, 895224, 1402941, 2184662, 3388915, 5228458, 8035921, 12291710, 18732318, 28425342, 42981877, 64740330
Offset: 0
-
nmax=50; CoefficientList[Series[Product[1/(1-x^k)^(k+1),{k,2,nmax}],{x,0,nmax}],x] (* Vaclav Kotesovec, Mar 04 2015 *)
A217194
Number of unlabeled simple graphs with n nodes of 2 colors whose components are path graphs.
Original entry on oeis.org
1, 2, 6, 16, 42, 106, 267, 656, 1602, 3868, 9270, 22048, 52140, 122580, 286798, 667944, 1549259, 3579738, 8242638, 18917600, 43286909, 98768820, 224768425, 510235760, 1155553468, 2611251662, 5888421059, 13252176464, 29768501556, 66749440076, 149415504274
Offset: 0
a(3) = 16 because we have:
w w w; w w b; w b b; b b b;
w w-w; w w-b; w b-b; b w-w; b w-b; b b-b;
w-w-w; w-w-b; w-b-w; b-w-b; b-b-w; b-b-b, where the 2 colors are black b and white w.
-
with(numtheory):
a:= proc(n) option remember; `if`(n=0, 1, add(add(d*(2^(d-1)+
2^(floor((d+1)/2)-1)), d=divisors(j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..30); # Alois P. Heinz, Sep 27 2012
-
nn=30;p=Product[1/(1- x^i)^(2^(i-1)+2^(Floor[(i+1)/2]-1)),{i,1,nn}];CoefficientList[Series[p,{x,0,nn}],x]
A089351
Number of planar partitions of n with trace 4.
Original entry on oeis.org
1, 2, 6, 14, 33, 64, 127, 228, 404, 672, 1100, 1724, 2661, 3974, 5849, 8402, 11911, 16556, 22751, 30772, 41198, 54436, 71283, 92316, 118609, 150950, 190753, 239090, 297783, 368236, 452782, 553240, 672532, 812980, 978211, 1171144, 1396235
Offset: 4
- G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976 (Ch. XI, exercise 5 and Ch. XII, exercise 5).
A217201
Number of simple unlabeled graphs with n nodes of 2 colors whose components are cycles.
Original entry on oeis.org
1, 0, 0, 4, 6, 8, 23, 42, 83, 166, 324, 622, 1236, 2366, 4595, 8900, 17225, 33212, 64376, 124360, 240819, 466284, 904149, 1753782, 3407225, 6623274, 12892131, 25116456, 48987833, 95633480, 186891367, 365549578, 715661254, 1402246154, 2749778317, 5396266284
Offset: 0
-
with (numtheory):
b:= n-> `if`(n<3, 0, add(phi(d)*2^(n/d)/(2*n), d=divisors(n))+
`if`(irem(n, 2)=1, 2^((n-1)/2), 2^(n/2-1)+2^(n/2-2))):
a:= proc(n) option remember; local d, j; `if`(n=0, 1,
add(add(d*b(d), d=divisors(j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..40); # Alois P. Heinz, Sep 27 2012
-
Needs["Combinatorica`"]
a=Expand[Table[nn=n;CycleIndex[DihedralGroup[nn],s]/.Table[s[i]->2,{i,1,nn}],{n,1,30}]];
nn=30;p=Product[1/(1- x^i)^a[[i]],{i,3,nn}];CoefficientList[Series[p,{x,0,nn}],x]
(* Second program: *)
b[n_] := If[n < 3, 0, Sum[EulerPhi[d]*2^(n/d)/(2*n), {d, Divisors[n]}] + If[Mod[n, 2] == 1, 2^((n - 1)/2), 2^(n/2 - 1) + 2^(n/2 - 2)]];
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*b[d], {d, Divisors[j]}]*a[n - j], {j, 1, n}]/n];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 05 2017, after Alois P. Heinz *)
A299019
Expansion of Product_{k>=1} (1 - x^k)^(k+1).
Original entry on oeis.org
1, -2, -2, 2, 3, 6, -1, -2, -10, -14, -7, -2, 11, 26, 43, 30, 28, -6, -40, -92, -128, -132, -115, -48, 54, 200, 339, 484, 499, 476, 274, -32, -501, -998, -1539, -1924, -2042, -1838, -1139, 12, 1664, 3540, 5588, 7258, 8392, 8230, 6812, 3480, -1472, -8150, -15737, -23670, -30478
Offset: 0
-
nmax = 52; CoefficientList[Series[Product[(1 - x^k)^(k + 1), {k, 1, nmax}], {x, 0, nmax}], x]
nmax = 52; CoefficientList[Series[Exp[-Sum[(DivisorSigma[1, k] + DivisorSigma[2, k]) x^k/k, {k, 1, nmax}]], {x, 0, nmax}], x]
a[n_] := a[n] = If[n == 0, 1, -Sum[Sum[d (d + 1), {d, Divisors[k]}] a[n - k], {k, 1, n}]/n]; Table[a[n], {n, 0, 52}]
A307975
G.f. A(x) satisfies: A(x) = x * exp(Sum_{k>=1} (A(x^k) + sigma(k)*x^k)/k).
Original entry on oeis.org
0, 1, 2, 6, 17, 52, 161, 524, 1739, 5929, 20562, 72471, 258596, 932897, 3395922, 12459900, 46028216, 171056252, 639072199, 2398886256, 9042816457, 34217811625, 129926976921, 494892472911, 1890469032715, 7240573075556, 27799085344845, 106970043377619, 412474047216418
Offset: 0
G.f.: A(x) = x + 2*x^2 + 6*x^3 + 17*x^4 + 52*x^5 + 161*x^6 + 524*x^7 + 1739*x^8 + 5929*x^9 + 20562*x^10 + ...
-
terms = 28; A[] = 0; Do[A[x] = x Exp[Sum[(A[x^k] + DivisorSigma[1, k] x^k)/k, {k, 1, terms}]] + O[x]^(terms + 1) // Normal, terms + 1]; CoefficientList[A[x], x]
a[n_] := a[n] = SeriesCoefficient[x Product[1/(1 - x^k)^(a[k] + 1), {k, 1, n - 1}], {x, 0, n}]; Table[a[n], {n, 0, 28}]
Comments