# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a323234 Showing 1-1 of 1 %I A323234 #9 Jan 08 2019 19:08:03 %S A323234 1,2,3,2,4,5,6,2,4,7,8,9,10,11,12,2,4,7,8,13,14,15,16,17,18,19,20,21, %T A323234 22,23,24,2,4,7,8,13,14,15,16,25,26,27,28,29,30,31,32,33,34,35,36,37, %U A323234 38,39,40,41,42,43,44,45,46,47,48,2,4,7,8,13,14,15,16,25,26,27,28,29,30,31,32,49,50,51,52,53,54,55,56,57,58,59,60,61 %N A323234 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, and for n > 1, f(n) = ordered pair [A053645(n), A079944(n-2)], where A053645(n) gives n without its most significant bit, while A079944(n-2) gives the second most significant bit of n. %C A323234 Also the restricted growth sequence transform of function f(1) = 0, f(n) = [A053645(n), A278222(n)] for n > 1. %C A323234 For all i, j: %C A323234 a(i) = a(j) => A286622(i) = A286622(j), %C A323234 a(i) = a(j) => A323235(i) = A323235(j), %C A323234 a(i) = a(j) => A323236(i) = A323236(j). %H A323234 Antti Karttunen, Table of n, a(n) for n = 1..65537 %H A323234 Index entries for sequences related to binary expansion of n %o A323234 (PARI) %o A323234 up_to = 65537; %o A323234 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; }; %o A323234 A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644 %o A323234 A053645(n) = (n-A053644(n)); %o A323234 A079944off0(n) = (1==binary(2+n)[2]); %o A323234 A323234aux(n) = if(1==n,0,[A053645(n), A079944off0(n-2)]); %o A323234 v323234 = rgs_transform(vector(up_to,n,A323234aux(n))); %o A323234 A323234(n) = v323234[n]; %Y A323234 Cf. A053645, A079944, A278222, A286622, A323235, A323236. %Y A323234 Cf. also A300226 (an analogous filter sequence for prime factorization). %K A323234 nonn,base %O A323234 1,2 %A A323234 _Antti Karttunen_, Jan 08 2019 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE