cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A371343 Lexicographically latest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of n and of a(n) have the same length (A070939) and the same number of runs of consecutive equals digits (A005811).

This page as a plain text file.
%I A371343 #31 Apr 11 2024 10:37:46
%S A371343 0,1,2,3,6,5,4,7,14,13,10,11,12,9,8,15,30,29,26,27,22,21,20,25,28,23,
%T A371343 18,19,24,17,16,31,62,61,58,59,54,53,52,57,50,45,42,43,46,41,44,55,60,
%U A371343 51,40,49,38,37,36,47,56,39,34,35,48,33,32,63,126,125,122
%N A371343 Lexicographically latest sequence of distinct nonnegative integers such that for any n >= 0, the binary expansions of n and of a(n) have the same length (A070939) and the same number of runs of consecutive equals digits (A005811).
%C A371343 This sequence is a self-inverse permutation of the nonnegative integers with infinitely many fixed points (for example, all terms of A000225 are fixed points).
%H A371343 Rémy Sigrist, <a href="/A371343/b371343.txt">Table of n, a(n) for n = 0..8191</a>
%H A371343 Rémy Sigrist, <a href="/A371343/a371343.png">Colored scatterplot of the first 2^20 terms</a> (where the color is function of A005811(n))
%H A371343 Rémy Sigrist, <a href="/A371343/a371343.gp.txt">PARI program</a>
%H A371343 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A371343 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A371343 The first terms, in decimal and in binary, are:
%e A371343   n   a(n)  bin(n)  bin(a(n))
%e A371343   --  ----  ------  ---------
%e A371343    0     0
%e A371343    1     1       1          1
%e A371343    2     2      10         10
%e A371343    3     3      11         11
%e A371343    4     6     100        110
%e A371343    5     5     101        101
%e A371343    6     4     110        100
%e A371343    7     7     111        111
%e A371343    8    14    1000       1110
%e A371343    9    13    1001       1101
%e A371343   10    10    1010       1010
%e A371343   11    11    1011       1011
%e A371343   12    12    1100       1100
%e A371343   13     9    1101       1001
%e A371343   14     8    1110       1000
%e A371343   15    15    1111       1111
%o A371343 (PARI) \\ See Links section.
%Y A371343 See A331274 and A337242 for similar sequences.
%Y A371343 Cf. A000225, A005811, A070939.
%K A371343 nonn,base
%O A371343 0,3
%A A371343 _Rémy Sigrist_, Mar 24 2024