# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a371944 Showing 1-1 of 1 %I A371944 #16 Apr 17 2024 04:13:50 %S A371944 0,1,3,2,6,6,5,5,13,12,12,13,10,11,11,10,26,26,25,25,25,25,26,26,21, %T A371944 21,22,22,22,22,21,21,53,52,52,53,50,51,51,50,50,51,51,50,53,52,52,53, %U A371944 42,43,43,42,45,44,44,45,45,44,44,45,42,43,43,42,106,106 %N A371944 The binary expansion of a(n) corresponds to the ordinal transform (reduced modulo 2) of the binary expansion of n. %C A371944 Leading zeros are ignored. %C A371944 All terms belong to A063037. %H A371944 Rémy Sigrist, Table of n, a(n) for n = 0..8191 %H A371944 OEIS Wiki, Ordinal transform %H A371944 Index entries for sequences related to binary expansion of n %F A371944 A070939(a(n)) = A070939(n). %F A371944 a(floor(n/2)) = floor(a(n)/2). %e A371944 For n = 43: the binary expansion of 43 is "101011", the corresponding ordinal transform is "1, 1, 2, 2, 3, 4", reducing modulo 2 yields "110010", the binary expansion of a(43), so a(43) = 50. %t A371944 {0}~Join~Array[(c[0] = 1; c[1] = 1; FromDigits[Map[Mod[c[#]++, 2] &, IntegerDigits[#, 2] ], 2]) &, 120] (* _Michael De Vlieger_, Apr 16 2024 *) %o A371944 (PARI) a(n) = { my (b = binary(n), f = vector(2)); for (i = 1, #b, b[i] = f[1+b[i]]++;); fromdigits(b % 2, 2); } %Y A371944 Cf. A063037, A070939, A371961. %K A371944 nonn,base %O A371944 0,3 %A A371944 _Rémy Sigrist_, Apr 13 2024 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE