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.

A371261 Lexicographically latest sequence of distinct nonnegative integers such that the run lengths transforms of the ternary expansions of n and of a(n) are the same.

This page as a plain text file.
%I A371261 #16 Apr 01 2024 12:09:32
%S A371261 0,2,1,7,8,6,5,3,4,22,23,21,25,26,24,20,19,18,17,16,15,11,9,10,14,12,
%T A371261 13,67,68,66,70,71,69,65,64,63,76,77,75,79,80,78,74,73,72,62,61,60,59,
%U A371261 58,57,56,55,54,53,52,51,50,49,48,47,46,45,35,34,33,29,27
%N A371261 Lexicographically latest sequence of distinct nonnegative integers such that the run lengths transforms of the ternary expansions of n and of a(n) are the same.
%C A371261 This sequence is a self-inverse permutation of the nonnegative integers.
%H A371261 Rémy Sigrist, <a href="/A371261/b371261.txt">Table of n, a(n) for n = 0..6560</a>
%H A371261 Rémy Sigrist, <a href="/A371261/a371261.gp.txt">PARI program</a>
%H A371261 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A371261 A371256(a(n)) = A371256(n).
%F A371261 a(A371257(n, k)) = A371257(n, 2^A005811(n) + 1 - k) for any n >= 0 and k in 1..2^A005811(n).
%e A371261 The first terms, in decimal and in base 3, are:
%e A371261   n   a(n)  ter(n)  ter(a(n))
%e A371261   --  ----  ------  ---------
%e A371261    0     0       0          0
%e A371261    1     2       1          2
%e A371261    2     1       2          1
%e A371261    3     7      10         21
%e A371261    4     8      11         22
%e A371261    5     6      12         20
%e A371261    6     5      20         12
%e A371261    7     3      21         10
%e A371261    8     4      22         11
%e A371261    9    22     100        211
%e A371261   10    23     101        212
%e A371261   11    21     102        210
%e A371261   12    25     110        221
%e A371261   13    26     111        222
%e A371261   14    24     112        220
%e A371261   15    20     120        202
%o A371261 (PARI) \\ See Links section.
%Y A371261 See A371267 for a similar sequence.
%Y A371261 Cf. A371256, A371257.
%K A371261 nonn,base
%O A371261 0,2
%A A371261 _Rémy Sigrist_, Mar 16 2024