[go: up one dir, main page]

login
Number of distinct functions f representable as x -> x^x^...^x with n x's and parentheses inserted in all possible ways giving result f(0)=1, with conventions that 0^0=1^0=1^1=1, 0^1=0.
7

%I #33 Mar 05 2019 18:05:15

%S 0,0,1,1,3,5,14,29,77,179,472,1174,3100,8018,21370,56601,152337,

%T 409954,1113501,3030710,8298035,22780468,62800860,173586690,481335403,

%U 1337916253,3728371645,10412163861,29139846448,81705768401,229513225545,645777766253

%N Number of distinct functions f representable as x -> x^x^...^x with n x's and parentheses inserted in all possible ways giving result f(0)=1, with conventions that 0^0=1^0=1^1=1, 0^1=0.

%C A000081(n) distinct functions are representable as x -> x^x^...^x with n x's and parentheses inserted in all possible ways. Some functions are representable in more than one way, the number of valid parenthesizations is A000108(n-1) for n>0.

%H Alois P. Heinz, <a href="/A222380/b222380.txt">Table of n, a(n) for n = 0..1000</a>

%H Alois P. Heinz, <a href="/A222379/a222379.jpg">Plot of A000081(8) = 115 = 77 + 38 functions with 8 x's</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Zero_to_the_power_of_zero">Zero to the power of zero</a>

%F a(n) + A222379(n) = A000081(n).

%F a(n) - A222379(n) = A211192(n).

%F a(n) = Sum_{i=A087803(n-1)+1..A087803(n)} A306710(i).

%e There are A000081(4) = 4 functions f representable as x -> x^x^...^x with 4 x's and parentheses inserted in all possible ways: ((x^x)^x)^x, (x^x)^(x^x) == (x^(x^x))^x, x^((x^x)^x), x^(x^(x^x)). Only x^((x^x)^x) evaluates to 0 at x=0: 0^((0^0)^0) = 0^(1^0) = 0^1 = 0. Three functions evaluate to 1 at x=0: ((0^0)^0)^0 = (1^0)^0 = 1^0 = 1, (0^0)^(0^0) = 1^1 = 1, 0^(0^(0^0)) = 0^(0^1) = 0^0 = 1. Thus a(4) = 3.

%p g:= proc(n, i) option remember; `if`(n=0, [0, 1], `if`(i<1, 0, (v->[v[1]-

%p v[2], v[2]])(add(((l, h)-> [binomial(l[2]+l[1]+j-1, j)*(h[1]+h[2]),

%p binomial(l[1]+j-1, j)*h[2]])(g(i-1$2), g(n-i*j, i-1)), j=0..n/i))))

%p end:

%p a:= n-> g(n-1$2)[1]:

%p seq(a(n), n=0..40);

%t f[l_, h_] := {Binomial[l[[2]] + l[[1]] + j - 1, j]*(h[[1]] + h[[2]]), Binomial[l[[1]] + j - 1, j]*h[[2]]};

%t g[n_, i_] := g[n, i] = If[n == 0, {0, 1}, If[i < 1, {0, 0}, Function[v, {v[[1]] - v[[2]], v[[2]]}][Sum[f[g[i - 1, i - 1], g[n - i*j, i - 1]], {j, 0, Quotient[n, i]}]]]];

%t a[n_] := g[n - 1, n - 1][[1]];

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Feb 27 2019, after _Alois P. Heinz_ *)

%Y Cf. A000081, A000108, A055113, A087803, A211192, A215703, A222379, A306710.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Feb 17 2013