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!)
A353733 a(0)=0, a(1)=1; for k >= 1, a(2*k+1) and a(2*k+2) are the two smallest numbers not yet in the sequence whose binary expansions have no 1's in common with the binary expansion of a(k). 3

%I #22 May 18 2022 03:28:14

%S 0,1,2,4,6,5,8,3,9,16,17,10,18,7,19,12,20,22,32,11,13,14,34,21,33,36,

%T 37,24,40,44,64,35,48,41,42,65,72,15,23,52,68,50,66,49,80,25,28,74,96,

%U 26,30,27,67,82,88,38,39,69,70,81,83,29,31,76,84,71,73,86

%N a(0)=0, a(1)=1; for k >= 1, a(2*k+1) and a(2*k+2) are the two smallest numbers not yet in the sequence whose binary expansions have no 1's in common with the binary expansion of a(k).

%C A variant of A352808.

%C This is a permutation of the nonnegative numbers (the proof is similar to that for A352808).

%H Michael S. Branicky, <a href="/A353733/b353733.txt">Table of n, a(n) for n = 0..10000</a>

%e For k=2, after a(2) = 2 = 10_2, we get a(5) = 5 = 101_2 and a(6) = 8 = 1000_2 since 101_2, 1000_2 have no 1's in common with 10_2.

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o alst = [0, 1]; aset = {0, 1}; yield from alst

%o mink = 2

%o for n in count(2):

%o ahalf, k = alst[(n-1)//2], mink

%o while k in aset or k&ahalf: k += 1

%o alst.append(k); aset.add(k); yield k

%o while mink in aset: mink += 1

%o print(list(islice(agen(), 68))) # _Michael S. Branicky_, May 17 2022

%Y Cf. A352808.

%K nonn,look

%O 0,3

%A _N. J. A. Sloane_, May 17 2022

%E More terms from _Michael S. Branicky_, May 17 2022

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 September 14 21:48 EDT 2024. Contains 375929 sequences. (Running on oeis4.)