Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Oct 03 2024 11:03:20
%S 0,1,2,4,5,3,10,8,9,11,18,6,20,21,7,19,22,36,16,40,41,17,37,23,14,12,
%T 13,15,42,82,38,44,32,72,73,33,45,39,83,43,74,34,46,80,81,47,35,75,26,
%U 30,28,24,25,29,31,27,78,164,84,144,64,88,89,65,145,85,165
%N a(1) = 0; for any any n > 1, if A376637(n) starts with a digit 1 then a(n) = 2*a(A376676(n)) otherwise a(n) = 2*a(A376676(n)) + 1.
%C The binary expansion of a(n) encodes the position of A376637(n) within the binary tree underlying A376676 (see illustration in Links section).
%C This sequence is a bijection from the positive integers to the nonnegative integers.
%H Rémy Sigrist, <a href="/A376733/b376733.txt">Table of n, a(n) for n = 1..10048</a>
%H Rémy Sigrist, <a href="/A376733/a376733.png">Illustration of terms < 32</a> (where b = A376637)
%H Rémy Sigrist, <a href="/A376733/a376733.gp.txt">PARI program</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A070939(a(n)) = A376698(n) for any n > 0.
%e See illustration in Links section.
%o (PARI) \\ See Links section.
%Y Cf. A070939, A376637, A376676, A376698.
%K nonn,base
%O 1,3
%A _Rémy Sigrist_, Oct 03 2024