The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A372129 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of a(n), a(2*n+1) and a(2*n+2) have distinct 1's. 5

%I #17 Apr 29 2024 09:29:45

%S 0,1,2,4,8,5,16,3,24,6,17,10,32,7,40,12,48,33,64,9,80,14,96,20,65,11,

%T 68,56,128,18,69,19,160,13,66,22,72,15,144,34,84,35,132,49,192,21,130,

%U 41,194,26,36,52,256,25,162,67,260,23,104,37,136,42,272,44

%N Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of a(n), a(2*n+1) and a(2*n+2) have distinct 1's.

%C This sequence is a permutation of the nonnegative integers with inverse A372131:

%C - for any k >= 0, the first term >= 2^k is precisely 2^k,

%C - all powers of 2 appear in the sequence, in increasing order,

%C - for any v >= 0, every power of 2 that doesn't appear in the binary expansion of v provides an opportunity to select v later, and eventually v will appear in the sequence.

%H Rémy Sigrist, <a href="/A372129/b372129.txt">Table of n, a(n) for n = 0..10000</a>

%H Rémy Sigrist, <a href="/A372129/a372129.gp.txt">PARI program</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) AND a(2*n+1) = a(n) AND a(2*n+2) = a(2*n+1) AND a(2*n+2) = 0 for any n >= 0 (where AND denotes the bitwise AND operator).

%e The first terms, arranged alongside a binary tree where siblings have distinct binary 1's and parent and children have distinct binary 1's, are:

%e |

%e .-------0-------.

%e | |

%e .---1---. .---2---.

%e | | | |

%e .-4-. .-8-. .-5-. .16-.

%e | | | | | | | |

%e 3 24 6 17 10 32 7 40

%o (PARI) \\ See Links section.

%Y See A372030 for similar sequences.

%Y Cf. A372130 (analog based on prime factors), A372131 (inverse), A372143 (analog with common 1 bit).

%K nonn,base

%O 0,3

%A _Rémy Sigrist_, Apr 20 2024

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 June 16 19:52 EDT 2024. Contains 373432 sequences. (Running on oeis4.)