%I
%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 stablesorted 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 (1based) 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..n1], left < ofSize k, right < ofSize (nk)]
%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
