A082543
Take a string of n x's and insert n-1 ^'s and n-1 pairs of parentheses in all possible ways. Sequence gives number of distinct integer values when x=sqrt(2).
Original entry on oeis.org
0, 0, 1, 1, 2, 2, 3, 4, 5, 7
Offset: 1
A003008
Number of n-level ladder expressions with A030798.
Original entry on oeis.org
1, 1, 2, 4, 8, 17, 39, 90, 213
Offset: 1
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
A297074
Number of ways of inserting parentheses in x^x^...^x (with n x's) whose result is an integer where x = sqrt(2).
Original entry on oeis.org
0, 0, 1, 1, 2, 5, 10, 23, 55
Offset: 1
With x = sqrt(2),
x = 1.414213... is not an integer, so a(1) = 0;
x^x = 1.632526... is not an integer, so a(2) = 0.
(x^x)^x = 2 is an integer, but x^(x^x) = 1.760839... is not, so a(3) = 1;
((x^x)^x)^x, (x^x)^(x^x), (x^(x^x))^x, and x^(x^(x^x)) are noninteger values, but x^((x^x)^x) = 2, so a(4) = 1;
the only ways of inserting parentheses in x^x^x^x^x that yield integer values are x^(x^((x^x)^x)) = 2 and (((x^x)^x)^x)^x = 4, so a(5) = 2.
-
With[{x = Sqrt@ 2}, Array[Count[#, ?IntegerQ] &@ Map[ToExpression@ StringReplace[ToString@ #, {"{" -> "(", "}" -> ")", "," -> "^"}] &, Groupings[#, 2] /. _Integer -> x] &, 9]] (* _Michael De Vlieger, Dec 24 2017 *)
Comments