%I #13 Dec 08 2017 11:25:28
%S 0,1,0,4,0,24,0,169,0,1316
%N a(n) is the number of ways of inserting parentheses into the expression i^i^i^...^i with n i's such that the result is a real value.
%C The real values are not necessarily distinct (see Example section).
%C There are A000108(n-1) (i.e., the (n-1)st Catalan number) of possible ways of inserting the parentheses.
%C The only expression at n=2 is real and evaluates to e^(-Pi/2) = 0.20787957...
%C The smallest and largest real values at n = 4, 6, 8, and 10 are as follows:
%C n = 4: 0.72141806... and 4.81047738...;
%C n = 6: 0.00052281... and 1.38615880...;
%C n = 8: 0.11333886... and 1912.71733823...;
%C n = 10: 1.46840571...*10^-1305 and 8.82309896...
%C Questions:
%C (1) Does a(n) = 0 for all odd n?
%C (2) Does there exist any expression of the form i^i^i^...^i with any number of i's and any way of inserting the parentheses that yields a negative real number?
%C Complex exponentials are in general multivalued: here the principal branch is used, so that a^b = exp(b*log(a)) where -Pi < Im(log(a)) <= Pi. - _Robert Israel_, Dec 07 2017
%e For n=1, the only expression is i itself (i.e., sqrt(-1), the imaginary unit), so a(1) = 0.
%e For n=2, the only expression is i^i, which evaluates to the real number e^(-Pi/2), so a(2) = 1.
%e For n=3, the only expressions are i^(i^i) and (i^i)^i, neither of which evaluates to a real number, so a(3) = 0.
%e For n=4, four of the A000108(4-1) = 5 parenthesized expressions yield real values, so a(4) = 4:
%e i^((i^i)^i) = ((i^i)^i)^i; and
%e (i^i)^(i^i) = (i^(i^i))^i.
%e For n=5, of the A000108(5-1) = 14 parenthesized expressions, none yield a real number, so a(5) = 5.
%e For n=6, 24 parenthesized expressions yield real values, so a(6) = 24:
%e i^((i^i)^((i^i)^i)) = i^((i^((i^i)^i))^i) = i^((((i^i)^i)^i)^i) = ((i^i)^i)^((i^i)^i) = ((i^i)^((i^i)^i))^i = ((i^((i^i)^i))^i)^i = ((((i^i)^i)^i)^i)^i;
%e (i^i)^(i^((i^i)^i)) = (i^i)^(((i^i)^i)^i);
%e (i^i)^((i^i)^(i^i)) = (i^i)^((i^(i^i))^i) = (i^((i^i)^(i^i)))^i = (i^((i^(i^i))^i))^i;
%e (i^(i^i))^((i^i)^i) = (i^((i^i)^i))^(i^i) = (((i^i)^i)^i)^(i^i) = (((i^i)^i)^(i^i))^i = (((i^i)^(i^i))^i)^i = (((i^(i^i))^i)^i)^i;
%e ((i^i)^(i^i))^(i^i) = ((i^(i^i))^i)^(i^i) = ((i^(i^i))^(i^i))^i; and
%e (i^(i^((i^i)^i)))^i = (i^(((i^i)^i)^i))^i.
%Y Cf. A000108, A198683.
%K nonn,more
%O 1,4
%A _Jon E. Schoenfield_, Nov 28 2017