Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A059893
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A059893 Reverse the order of all but the most significant bits in binary expansion of n. n = 1ab..yz -> 1zy..ba = a(n). +0
29
1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 14, 9, 13, 11, 15, 16, 24, 20, 28, 18, 26, 22, 30, 17, 25, 21, 29, 19, 27, 23, 31, 32, 48, 40, 56, 36, 52, 44, 60, 34, 50, 42, 58, 38, 54, 46, 62, 33, 49, 41, 57, 37, 53, 45, 61, 35, 51, 43, 59, 39, 55, 47, 63, 64, 96, 80, 112, 72, 104, 88, 120 (list; graph; listen)
OFFSET

1,2

COMMENT

A self-inverse permutation of the natural numbers.

a(n)=n if and only if A081242(n) is a palindrome. - Clark Kimberling (ck6(AT)evansville.edu), Mar 12 2003

a(n) is the position in B of the reveral of the n-th term of B, where B is the left-to-right binary enumeration sequence (A081242 with the empty word attached as first term). - Clark Kimberling (ck6(AT)evansville.edu), Mar 12 2003

When certain Stern-Brocot tree related permutations are conjugated with this permutation, they induce a permutation on Z (folded to N), which is an infinite siteswap permutation (see e.g. figure 7 in Buhler and Graham paper, which is permutation A065174) We get: A065260(n) = A(A057115(A(n))), A065266(n) = A(A065264(A(n))), A065272(n) = A(A065270(A(n))), A065278(n) = A(A065276(A(n))), A065284(n) = A(A065282(A(n))), A065290(n) = A(A065288(A(n))) [where A is an abbreviation for A059893 itself] - Antti Karttunen Oct 28 2001

LINKS

T. D. Noe, Table of n, a(n) for n=1..1023

Index entries for sequences related to Stern's sequences

Joe Buhler and Ron Graham, Juggling Drops and Descents, Amer. Math. Monthly, 101, (no. 6) 1994, 507 - 519.

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) = A030109(n)+A053644(n). If 2*2^k<=n<3*2^k then a(n)=2*a(n-2^k); if 3*2^k<=n<4*2^k then a(n)=1+ a(n-2^k) starting with a(1)=1. - Henry Bottomley (se16(AT)btinternet.com), Sep 13 2001

EXAMPLE

a(11)=a(1011)=1110=14.

With empty word e prefixed, A081242 becomes (e,1,2,11,21,12,22,111,211,121,221,112,...); (reversal of term #9)=(term #12); i.e. a(9)=12 and a(12)=9. - Clark Kimberling (ck6(AT)evansville.edu), Mar 12 2003

MAPLE

Implements Bottomley's formula: A059893 := proc(n) option remember; local k; if(1 = n) then RETURN(1); fi; k := floor_log_2(n)-1; if(2 = floor(n/(2^k))) then RETURN(2*A059893(n-(2^k))); else RETURN(1+A059893(n-(2^k))); fi; end;

floor_log_2 := proc(n) local nn, i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;

CROSSREFS

{A000027, A054429, A059893, A059894} form a 4-group.

Cf. A007931.

Sequence in context: A104464 A139706 A139708 this_sequence A132284 A131966 A064578

Adjacent sequences: A059890 A059891 A059892 this_sequence A059894 A059895 A059896

KEYWORD

easy,nonn,base,nice

AUTHOR

Marc LeBrun (mlb(AT)well.com), Feb 06 2001

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research