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!)
A177045 The ordering of expressions built from numbers 2 and exponentiations according to their numeric values. 0


%S 1,2,3,4,7,8,9,5,6,17,18,21,22,23,15,16,19,20,49,50,51,59,60,63,64,65,

%T 43,44,45,46,47,48,57,58,61,62,149,150,153,154,155,181,182,183,191,

%U 192,195,196,197,136,137,138,139,140,141,147,148,151,152,175,176,177,178,179,180,189,190,193,194,478,479,480,488,489,492,493,494,578,579,582,583,584,610,611,612,620,621,624,625,626,12,13,14,132,133,134,135,439,440,441

%N The ordering of expressions built from numbers 2 and exponentiations according to their numeric values.

%C Let S be the sequence of all possible expressions built from numbers 2 and exponentiations (^), sorted according to their natural structural ordering (2, 2^2, 2^(2^2), (2^2)^2, 2^(2^(2^2)), 2^((2^2)^2) and so on - see the exact definition in Haskell below).

%C Let S' be S stable-sorted according to the numeric values of its elements in ascending order (the stable sorting is a sorting that keeps the order of elements with equal keys - so 2^(2^2) and (2^2)^2 will be kept in the original order).

%C This sequence is S' where each expression is replaced with its original index (1-based) in S; it is a permutation of the natural numbers sequence.

%o (Haskell) data Expr = Two | Expr :^: Expr

%o -- needed only for presentation

%o instance Show Expr where show Two = "2"; show (x :^: y) = "(" ++ show x ++ "^" ++ show y ++ ")"

%o ofSize 1 = [Two]

%o ofSize n = [left :^: right | k <- [1..n-1], left <- ofSize k, right <- ofSize (n-k)]

%o -- this defines the S sequence

%o s = [e | n <- [1..], e <- ofSize n]

%K nonn

%O 1,2

%A _Vladimir Reshetnikov_, May 01 2010

%E First 100 terms from _D. S. McNeil_, May 04 2010

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 November 27 12:40 EST 2022. Contains 358405 sequences. (Running on oeis4.)