The OEIS is supported by the many generous donors to the OEIS Foundation.



Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002845 Number of distinct values taken by 2^2^...^2 (with n 2's and parentheses inserted in all possible ways).
(Formerly M1139 N0435)
1, 1, 1, 2, 4, 8, 17, 36, 78, 171, 379, 851, 1928, 4396, 10087, 23273, 53948, 125608, 293543, 688366, 1619087, 3818818, 9029719, 21400706, 50828664, 120963298, 288405081, 688821573, 1647853491, 3948189131, 9473431479 (list; graph; refs; listen; history; text; internal format)



a(n) <= A002955(n). - Max Alekseyev, Sep 23 2009


J. Q. Longyear, personal communication.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


Table of n, a(n) for n=1..31.

F. Goebel and R. P. Nederpelt, The number of numerical outcomes of iterated powers, Amer. Math. Monthly, 80 (1971), 1097-1103.

R. K. Guy, Letter to N. J. A. Sloane, June 24 1971: front, back [Annotated scanned copy, with permission]

R. K. Guy and J. L. Selfridge, The nesting and roosting habits of the laddered parenthesis, Amer. Math. Monthly 80 (8) (1973), 868-876.

R. K. Guy and J. L. Selfridge, The nesting and roosting habits of the laddered parenthesis (annotated cached copy, with permission)

Sean A. Irvine, Java program (github).

J. Longyear, T. Trotter, N. J. A. Sloane, Correspondence

MathOverflow, MathOverflow discussion of related questions

Vladimir Reshetnikov, Computes terms of OEIS sequence A002845 (C# library)

Jon E. Schoenfield, The 851 values for n=12

Index entries for sequences related to parenthesizing


When n=3, 2^(2^2) = (2^2)^2 = 16, so a(3) = 1.


Cf. A003018, A003019, A145545, A145546, A145547, A145548, A145549, A145550, A000081.

Sequence in context: A251691 A157904 A182901 * A072925 A002955 A202844

Adjacent sequences: A002842 A002843 A002844 * A002846 A002847 A002848




N. J. A. Sloane


a(12)-a(13) corrected and a(14)-a(27) added by Jon E. Schoenfield, Oct 11 2008

a(28)-a(29) computed by Kirill Osenkov, added by Vladimir Reshetnikov, Feb 07 2019

a(30)-a(31) added by Sean A. Irvine, Feb 18 2019



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 3 20:52 EST 2022. Contains 358543 sequences. (Running on oeis4.)