%I #4 May 01 2015 09:43:01
%S 4,8,16,27,32,64,81,128,243,256,512,729,1024,2048,2187,3125,4096,6561,
%T 8192,15625,16384,19683,32768,46656,59049,65536,78125,131072,177147,
%U 262144,279936,390625,524288,531441,823543,1048576,1594323,1679616
%N Set of numbers of the form a^b with 2<=a<=b (rare powers?), sorted.
%H Reinhard Zumkeller, <a href="/A122494/b122494.txt">Table of n, a(n) for n = 1..10000</a>
%e 279936 is there because it is 6^7.
%o (Haskell)
%o import Data.Set (singleton, deleteFindMin, insert)
%o a122494 n = a122494_list !! (n-1)
%o a122494_list = f (singleton (4, 2)) 27 [3..] where
%o f s uu us@(u:us'@(u':_))
%o | vv > uu = uu : f (insert (uu * u, u) s) (u' ^ u') us'
%o | vv < uu = vv : f (insert (vv * v, v) s') uu us
%o | otherwise = vv : f (insert (vv * v, v) s') (u' ^ u') us'
%o where ((vv, v), s') = deleteFindMin s
%o -- _Reinhard Zumkeller_, May 01 2015
%Y Subsequences: A000312, A257278.
%K nonn
%O 1,1
%A Paul Stoeber (pstoeber(AT)uni-potsdam.de), Sep 16 2006
|