Original entry on oeis.org
1, 1, 2, 5, 13, 32, 79, 193, 478, 1196, 3037, 7802, 20287, 53259, 141069, 376449, 1011295, 2732453, 7421128, 20247355, 55469186, 152524366, 420807220, 1164532203, 3231706847, 8991343356, 25075077684, 70082143952, 196268698259, 550695545855, 1547867058852
Offset: 1
a(4) = 1 - 4 + Sum_{k=1..4} A000081(k) = 1 - 4 + 1 + 1 + 2 + 4 = 5.
a(5) = 1 - 5 + Sum_{k=1..5} A000081(k) = 1 - 5 + 1 + 1 + 2 + 4 + 9 = 13.
-
with(numtheory):
t:= proc(n) option remember; `if`(n<2, n, (add(add(
d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
end:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
add(b(n-i*j, i-1)*binomial(t(i)+j-1, j), j=0..n/i)))
end:
a:= proc(n) option remember; `if`(n<3, 1,
b(n-1$2) +2*a(n-1) -a(n-2))
end:
seq(a(n), n=1..40); # Alois P. Heinz, Feb 17 2015
-
t[1] = a[1] = 1; t[n_] := t[n] = Sum[k t[k] t[n - k m]/(n-1), {k, n}, {m, (n-1)/k}]; a[n_] := a[n] = a[n-1] + t[n] - 1; Table[a[n], {n, 40}] (* Vladimir Reshetnikov, Aug 12 2016 *)
A174135
Irregular triangle read by rows: T(n,k), n >= 2, 1 <= k <= n/2, = number of rooted forests with n nodes and k trees, with at least two nodes in each tree.
Original entry on oeis.org
1, 2, 4, 1, 9, 2, 20, 7, 1, 48, 17, 2, 115, 48, 7, 1, 286, 124, 21, 2, 719, 336, 60, 7, 1, 1842, 888, 171, 21, 2, 4766, 2393, 488, 65, 7, 1, 12486, 6419, 1372, 187, 21, 2, 32973, 17376, 3862, 554, 65, 7, 1, 87811, 47097, 10846, 1600, 193, 21, 2, 235381, 128365, 30429, 4644, 574, 65, 7, 1, 634847, 350837, 85365, 13362, 1685, 193, 21, 2
Offset: 2
Triangle begins:
1,
2,
4, 1,
9, 2,
20, 7, 1,
48, 17, 2,
115, 48, 7, 1,
286, 124, 21, 2,
719, 336, 60, 7, 1,
1842, 888, 171, 21, 2,
4766, 2393, 488, 65, 7, 1,
12486, 6419, 1372, 187, 21, 2,
32973, 17376, 3862, 554, 65, 7, 1,
87811, 47097, 10846, 1600, 193, 21, 2,
235381, 128365, 30429, 4644, 574, 65, 7, 1,
634847, 350837, 85365, 13362, 1685, 193, 21, 2,
1721159, 962731, 239566, 38459, 4948, 581, 65, 7, 1,
...
-
with(numtheory):
t:= proc(n) option remember; local d, j; `if`(n<=1, n,
(add(add(d*t(d), d=divisors(j))*t(n-j), j=1..n-1))/(n-1))
end:
b:= proc(n, i, p) option remember; `if`(p>n, 0, `if`(n=0, 1,
`if`(p<1 or i<2, 0, add(b(n-i*j, i-1, p-j) *
binomial(t(i)+j-1, j), j=0..min(n/i, p) ))))
end:
T:= (n, k)-> b(n, n, k):
seq(seq(T(n, k), k=1..iquo(n, 2)), n=2..18); # Alois P. Heinz, May 17 2013
-
t[n_] := t[n] = Module[{d, j}, If[n <= 1, n, Sum[Sum[d*t[d], {d, Divisors[j]}]*t[n-j], {j, 1, n-1}]/(n-1)]]; b[n_, i_, p_] := b[n, i, p] = If[p > n, 0, If[n == 0, 1, If[p < 1 || i < 2, 0, Sum[b[n-i*j, i-1, p-j]* Binomial[t[i]+j-1, j], {j, 0, Min[n/i, p]}]]]]; T[n_, k_] := b[n, n, k]; Table[Table[T[n, k], {k, 1, Quotient[n, 2]}], {n, 2, 18}] // Flatten (* Jean-François Alcover, Mar 05 2014, after Alois P. Heinz *)
A199812
Number of distinct values taken by w^w^...^w (with n w's and parentheses inserted in all possible ways) where w is the first transfinite ordinal omega.
Original entry on oeis.org
1, 1, 2, 5, 13, 32, 79, 193, 478, 1196, 3037, 7802, 20287, 53259, 141069, 376449, 1011295, 2732453, 7421128, 20247355
Offset: 1
For n=5 there are 14 possible parenthesizations, but only 13 of them produce distinct ordinals: (((w^w)^w)^w)^w < ((w^w)^w)^(w^w) < ((w^w)^(w^w))^w < ((w^(w^w))^w)^w < (w^(w^w))^(w^w) < (w^w)^((w^w)^w) < (w^((w^w)^w))^w < w^(((w^w)^w)^w) < (w^w)^(w^(w^w)) = w^((w^w)^(w^w)) < (w^(w^(w^w)))^w < w^((w^(w^w))^w) < w^(w^((w^w)^w)) < w^(w^(w^(w^w))). So, a(5)=13.
-
(* Slow exhaustive search *)
_ \[Precedes] {} = False;
{} \[Precedes] {} = True;
{a_ \[Diamond] , __} \[Precedes] {b_ \[Diamond] , __} := a \[Precedes] b /; a =!= b;
{a_ \[Diamond] m_, _} \[Precedes] {a_ \[Diamond] n_, _} := m < n /; m != n;
{z_, x___} \[Precedes] {z_, y___} := {x} \[Precedes] {y};
m_ \[CirclePlus] {} := m;
{} \[CirclePlus] n_ := n;
{x___, a_ \[Diamond] m_} \[CirclePlus] {a_ \[Diamond] n_, y___} := {x, a \[Diamond] (m + n), y};
{x___, a_ \[Diamond] m_} \[CirclePlus] z : {b_ \[Diamond] n_, y___} := If[a \[Precedes] b, {x} \[CirclePlus] z, {x, a \[Diamond] m, b \[Diamond] n, y}];
{} \[CircleTimes] _ = {};
_ \[CircleTimes] {} = {};
{a_ \[Diamond] m_, x___} \[CircleTimes] {b_ \[Diamond] n_} := If[b === {}, {a \[Diamond] (m n), x}, {(a \[CirclePlus] b) \[Diamond] n}];
x_ \[CircleTimes] {y_, z__} := x \[CircleTimes] {y} \[CirclePlus] x \[CircleTimes] {z};
f[1] = {{{} \[Diamond] 1}};
f[n_] := f[n] = Union[Flatten[Table[Outer[#1 \[CircleTimes] {#2 \[Diamond] 1} &, f[k], f[n - k], 1], {k, n - 1}], 2]];
Table[Length[f[n]], {n, 1, 17}]
Showing 1-3 of 3 results.
Comments