[math-fun] Clumpy heapsort
13 Oct
2009
13 Oct
'09
10:17 p.m.
Here is as far as I've gone with the clumpy heapsort layout: http://www.tiac.net/~sw/2009/10/Clumpy_heapsort The one-argument recursive definition of the sequence (starting at one instead of zero) is: def A082008( n ): if n == 1: return 1 y = 2 ** int( log( n, 2 ) ) yc = 2 ** 2 ** int( log( log( y, 2 ), 2 ) ) yr = y / yc return (yc-1) * int( (n-y) / yr + 1 ) + A082008( yr + n % yr ) --Steve
5882
Age (days ago)
5882
Last active (days ago)
0 comments
1 participants
participants (1)
-
Steve Witham